arjunindia / mini-project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MiniProject

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

First, install JDK 21 from Microsoft from here.
Clone the repository and open it in your favorite IDE.\

In VSCode, install the following extensions:

Update your local database connection in application.yml or create your own application-local.yml file to override settings for development. (This is not necessary for the first start, as the application uses an in-memory database by default.)

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

The application can be started with the following command:

gradlew bootRun

Lombok must be supported by your IDE. For 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. On first usage and after updates 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.

Build

The application can be built using the following command:

gradlew clean build

Node.js is automatically downloaded using the gradle-node-plugin and the final JS/CSS files are integrated into the jar.

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

java -Dspring.profiles.active=production -jar ./build/libs/mini-project-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=io.bootify/mini-project

Further readings

About


Languages

Language:Java 56.3%Language:HTML 38.9%Language:JavaScript 4.7%Language:CSS 0.1%