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.
- Java 11
- Spring Boot version 2.7.4
- Hibernate JPA
- MySQL
- Docker
- Maven
- Validate deal details before persisting.
- Prevent duplicate deals.
- Insert all valid deals without rollback on errors.
- logging and error handling.
- Unit testing
- 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.
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
- 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
- URL:
- Clone
- git clone https://github.com/madodabado/fxdeal.git
- 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
- Method :POST
- URL : http://localhost:8081/api/deals
- Body (Example) :
{ "dealUniqueId": "123we335245", "fromCurrencyIsoCode": "EUR", "toCurrencyIsoCode": "EUR", "dealTimestamp": "2024-05-20T07:15:30", "dealAmount": 10 }