This repository is to show sample of multi-module spring boot application with Gradle
- Java JDK Version: 11 Adopt OpenJDK (
java -version
) - Git Client: Any latest version (
git --version
) - Integrated Development Environment: Any version of IntelliJ Idea or Eclipse (with
Annotations Processing
enabled forImmutables
library)
Swagger UI
andOpenAPI docs
- Using
Immutables
java library for request and response dto in REST apis Thymeleaf
templates in server side web or htmlLogback
for application logsLogback Access
for tomcat access logsRest Assured
library for testing api withrequest
,response
andcurl
commands captured in console and gradle test reportsFeature toggle
integration test for spring application- Multi-module structure which
reuses test classes
betweenunit
,integration
andacceptance
tests
./gradlew clean build
./gradlew clean bootRun
Open the urls in the browser
http://localhost:8081
http://localhost:8081/swagger-ui.html
http://localhost:8081/api-docs
java -jar application/build/libs/application.jar
./gradlew clean qaAcceptanceTest -DtestEnvironment=development
or
TEST_ENVIRONMENT='development' ./gradlew clean qaAcceptanceTest
Run the application in a terminal
./gradlew clean bootRun
Run the tests in another terminal window
./gradlew clean qaAcceptanceTest