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.
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".
Update your local database connection in application.yml
or create your own application-local.yml
file to override settings for development.
Lombok must be supported by your IDE. For this, in IntelliJ install the Lombok plugin and enable annotation processing - learn more.
In addition to the Spring Boot application, the DevServer must also be started. Node.js has to be available on the system - the latest LTS version is recommended. Only once the dependencies have to be installed:
npm install
The DevServer can now be started as follows:
npm run devserver
Using a proxy the whole application is now accessible under localhost:8081
. All changes to the templates and JS/CSS files are immediately visible in the browser.
The application can be built using the following command:
mvnw clean package
Node.js is automatically downloaded using the frontend-maven-plugin
and the final JS/CSS files are integrated into the jar.
The application can then be started with the following command - here with the profile production
:
java -Dspring.profiles.active=production -jar ./target/springboot-amenity-0.0.1-SNAPSHOT.jar