java-web/examples/chapter07/paopao
2024-11-19 12:36:55 +08:00
..
gradle/wrapper spring boot init 2024-11-19 10:06:55 +08:00
src c7 changed 2024-11-19 12:36:55 +08:00
.gitattributes spring boot init 2024-11-19 10:06:55 +08:00
.gitignore spring boot init 2024-11-19 10:06:55 +08:00
build.gradle spring boot init 2024-11-19 10:06:55 +08:00
gradlew spring boot init 2024-11-19 10:06:55 +08:00
gradlew.bat spring boot init 2024-11-19 10:06:55 +08:00
README.md spring boot init 2024-11-19 10:06:55 +08:00
settings.gradle spring boot init 2024-11-19 10:06:55 +08:00

Paopao

This app was created with Bootify.io - tips on working with the code can be found here. Feel free to contact us for further questions.

Development

Update your local database connection in application.yml or create your own application-local.yml file to override settings for development.

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".

Lombok must be supported by your IDE. For IntelliJ install the Lombok plugin and enable annotation processing - learn more.

After starting the application it is accessible under localhost:8080.

Build

The application can be built using the following command:

gradlew clean build

Start your application with the following command - here with the profile production:

java -Dspring.profiles.active=production -jar ./build/libs/paopao-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.

gradlew bootBuildImage --imageName=com.lk/paopao

Further readings