When starting the application docker compose up
is called and the app will connect to the contained services.
Docker must be available on the current system.
During development it is recommended to use the profile local
. In IntelliJ -Dspring.profiles.active=local
can be
added in the VM options of the Run Configuration after enabling this property in "Modify options". Create your own
application-local.yml
file to override settings for development.
After starting the application it is accessible under localhost:8080
.
The application can be built using the following command:
mvnw clean package
Start your application with the following command - here with the profile production
:
java -Dspring.profiles.active=production -jar ./target/ah-jsb-auth-0.0.1-SNAPSHOT.jar
If required, a Docker image can be created with the Spring Boot plugin. Add SPRING_PROFILES_ACTIVE=production
as
environment variable when running the container.
mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=com.hingtingchot/ah-jsb-auth
The Swagger UI page will then be available at swagger-ui/index.html and and the OpenAPI description will be available at the following url for json format: v3/api-docs.