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 Processingenabled forImmutableslibrary)
Swagger UIandOpenAPI docs- Using
Immutablesjava library for request and response dto in REST apis Thymeleaftemplates in server side web or htmlLogbackfor application logsLogback Accessfor tomcat access logsRest Assuredlibrary for testing api withrequest,responseandcurlcommands captured in console and gradle test reportsFeature toggleintegration test for spring application- Multi-module structure which
reuses test classesbetweenunit,integrationandacceptancetests
./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