Service template for new microservices.
- Java 21
- Gradle
- Spring Boot (Web, Data JPA)
- OpenAPI
- PostgreSQL + Flyway
- Docker + Docker Compose
- Spring Test + JUnit 5 + Mockito + AssertJ + Testcontainers
- Lombok, MapStruct
PostgreSQL was chosen as the database. It's is an open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
Openapi was chosen for designing, building, documenting and consuming REST APIs.
Kotlin was chosen for configuring Gradle.
CheckStyle, Jacoco and Pmd plugins were chosen for supporting quality and reliable code.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Project requires Java 21, Make, Docker.
Instructions for Java: AdoptOpenJDK installation
Instructions for Docker: Docker installation
Instructions for Make: Install make on Windows
Build the project:
make docker-compose-up-infra
make docker-compose-up
When adding new feature to project make sure code satisfies rules made with CheckStyle, Pmd plugins. Useful documentation:
For CheckStyle: CheckStyle Rules
For Pmd: Pmd Java Rules
Also, minimal test coverage must be 75%. For more information visit Jacoco Documentation