Sample application using Spring Boot and Angular 5 to demo validation of Trade Validation.
As main focus is on REST Service, and Swagger is integrated which provide better UI. Additionally UI is implemented in very basic level, just a simple form. Sample application is deployed in Heroku cloud https://trade-validation-service.herokuapp.com
- Clone the project from git hub
- cd /trade-validator/trade-validator-client
- npm install
- ng build -prod
- Move tp Spring Boot as cd ../trade-validator-service/
- Build Spring boot using "mvn clean install"
- Start the application "java -jar target/trade-validator-service-0.0.1-SNAPSHOT.jar"
- Login to heroku create application name and generate key.
- Open pom.xml and change the application name to registered once.
- Build Using command "HEROKU_API_KEY=<Heroku_Key> mvn heroku:deploy"
- This application is developed based on TDD approach, we can find all test cases related to TDD using MockMVC
- BDD is not yet done
- Checkstyle is integrated with build. Any violation build will fail.
- SonarCube report : https://sonarcloud.io/dashboard?id=com.coding.trade%3Atrade-validator-service
- Code Coverage: Has 96% coverage.
- Since developed using TDD, any refactoring of code will take less time and no need of regression.
- REST Documentation: Swagger report will be avaiable on url https://trade-validation-service.herokuapp.com/swagger-ui.html
1. Enabled Spring actuator for gracefull application shutdown.
2. Implemented /api/shutdown to handle gracefull application shutdown.
1. Enabled Spring actuator for metrics, Where application metrics like liveRequest also included /metrics
2. Additionally details stats implemented under /stats
- Application is designed using Single Responsibility Principle by SOLID. So additional details are created as separate service such as TradeInfoService, HolidayService etc.., which provides hardcoded values. In-real this need to enchanced with database or 3rd Party API.