Code Monkey home page Code Monkey logo

fxdeal's Introduction

FX Deal Data Warehouse

Overview

This project is part of a scrum team developing a data warehouse for Bloomberg to analyze FX deals. T he system accepts deal details and persists them into a database.

Requirements

  • Java 11
  • Spring Boot version 2.7.4
  • Hibernate JPA
  • MySQL
  • Docker
  • Maven

Features

  • Validate deal details before persisting.
  • Prevent duplicate deals.
  • Insert all valid deals without rollback on errors.
  • logging and error handling.
  • Unit testing

Setup

Prerequisites

  • Ensure you have Java 11 installed.
  • Docker installed.
  • MySQL installed and running or you can use MySQL Connection already available in the project its public.

Database Configuration

Update the application.properties file with your database configuration:

spring.datasource.url=dbc:mysql://104.131.168.21:3306/clusterddw?autoReconnect=true&useUnicode=true
spring.datasource.username=root
spring.datasource.password=xxxxxxx
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

Docker Deployment

  • Make sure that the fxdeal-0.0.1-SNAPSHOT.jar file in the Root folder with the Docker file.
  • Run the following command :
    • docker build -t fxdeal . // to build the image
    • docker run --name fxdeal fxdeal // to run the container

GITHub Repository

Run Spring boot application

  • Using maven
mvn clean package
  • Navigate to the /target file where the jar file generated
  • Execute the jar file
    java -jar fxdeal-0.0.1-SNAPSHOT.jar

POSTMAN Test

  • Method :POST
  • URL : http://localhost:8081/api/deals
  • Body (Example) :
    {
    
     "dealUniqueId": "123we335245",
     "fromCurrencyIsoCode": "EUR",
     "toCurrencyIsoCode": "EUR",
     "dealTimestamp": "2024-05-20T07:15:30",
     "dealAmount": 10
    }
    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.