This is a sample project created with Spring Boot 3.5.6, using Java 21 and Gradle (Groovy DSL) as the build tool.
- Java 21
- Spring Boot 3.5.6
- Gradle (Groovy DSL)
- YAML for configuration (
application.yaml)
- Lombok
- H2 Database
- MapStruct
- Logging - endpoint interceptor
- Colorized Console Logs
use environment variableLOGGING_COLORS_ENABLED** - Swagger
access the link: http://localhost:8080/swagger-ui/index.html** - Spring Boot Validation
- Dockerfile
build: docker build -t template-api-image
docker run -d --name template-api -p 8080:8080 template-api-image - docker-compose
build: docker compose build
run: docker compose up
- Java 21 installed
- Gradle 8+ (or use the included wrapper)
- Compatible IDE (IntelliJ IDEA, VS Code, Eclipse, etc.)
- Clone the repository
- git clone https://github.com/seu-usuario/demo.git
- cd demo
- Run with Gradle
- ./gradlew bootRun
- Access the application
- To execute automated tests:
- ./gradlew test
- Generate the .jar file:
- ./gradlew build
- The final artifact will be created at:
- build/libs/demo-0.0.1-SNAPSHOT.jar
- URL: http://localhost:8080/h2-console
- JDBC URL: jdbc:h2:mem:testdb
- Username: sa
- Password: (leave empty)