- n-tier layers: Models, Dao, Service & Web API as default layers.
- Extra layer: security. Seperated from services to be able to mock security
- Dao & Services exposed using interfaces, keeping everything decoupled and clean.
- Mocking for DAO
- application.properties to control each dao (choose mock or real for each data source you have)
- Unit testing with JUnit
- Swagger UI (Auto generate docs using javadoc standard) - keep your code documented, document Interfaces & Controller
- Secured Routes With Roles
- Security headers and api throttle
- Integration Tests
- Add docker compose
- Post, Put, Remove - test and make it work better
- Add swagger schema examples
- Add unit tests for the brand-new security service
- Make sure you have java installed
- Install JDK 19
- Clone project to your local computer
- Use your preffered IDE to open the skeleton
- Edit according to needs (or use example to check it out)
- Run using the pre-build run configuration under .run or using the command:
./mvnw spring-boot:run
- API is available on
http://localhost:8080
by default - Swagger access is granted by
http://localhost:8080/swagger
- Run
./mvnw package
inside the root folder to build executable jar - Build output is under target/your-build-name.SNAPSHOT.jar
- Run
java -jar build-output-name.jar
- To add profiles add flag:
-Dspring.profiles.active=prod
- Example with profile:
ava -jar -Dspring.profiles.active=prod build-output-name.jar