This home assignment is a simple product and order application developed using SpringBoot.
Anonymous access is allowed and CORS controls are disabled.
- Java
- SpringBoot 2.x
- H2(Dev) / Postgres (Prod)
- Spring Data JPA
- Swagger2
- SonarQube
- Jacoco
- Maven
- JUnit 5, Mockito, Testcontainers
$ ./mvnw clean verify
$ ./mvnw clean package & java -jar target/assignment-0.0.1-SNAPSHOT.jar
Spring boot maven plugin has new goal to build image.
$ ./mvnw spring-boot:build-image
To start application with H2
$ docker build -t product . && docker run -p8080:8080 -it product
To start application and Postgres
$ mvn clean package && docker-compose -f docker-compose.yml up --build --force-recreate
To stop
$ docker-compose down
$ ./run.sh sonar
$ ./mvnw clean verify -P sonar -Dsonar.login=$SONAR_LOGIN_TOKEN
Swagger API documentation can be reeached.
- Enable security (JWT integration, OAuth2, etch)
- Add additional integration tests (postman integration test, Cucumber, Selenium, etc)
- Improve Test coverage
- Performance tests can be added (Gatlin or JMeter)
- Add scripts for build or deployment commands.
- I18n support
- Jenkinsfile
- Improve API Documentation
- SKU information for product can be gnerated automatically, or retreived from and external service.
- https://spring.io/projects/spring-boot
- https://start.spring.io/
- https://prometheus.io/
- https://grafana.com/
- https://docs.docker.com/
- https://jenkins.io/doc/
- https://www.elastic.co/elk-stack
- https://gatling.io/
- https://www.sonarqube.org/
- https://sonarcloud.io/
The following guides illustrate how to use some features concretely: