Skip to content

Alchemik/base-starter-spring-gradle

 
 

Repository files navigation

Vaadin Gradle Skeleton Starter Spring Boot

This project demos the possibility of having Vaadin project in npm+webpack mode using Gradle. Please see the Starting a Vaadin project using Gradle for the documentation.

Prerequisites:

  • Java 17 or higher
  • node.js and npm. Vaadin Gradle plugin will install those for you automatically (handy for CI), or you can install it to your OS:
  • Git
  • (Optionally): Intellij Community

Vaadin Versions

  • The v14 branch (the default one) contains the example app for Vaadin 14
  • The master branch contains the example app for Vaadin 19

Running With Spring Boot via Gradle In Development Mode

Run the following command in this repo:

./gradlew clean bootRun

Now you can open the http://localhost:8080 with your browser.

Running With Spring Boot from your IDE In Development Mode

Run the following command in this repo, to create necessary Vaadin config files:

./gradlew clean vaadinPrepareFrontend

The build/vaadin-generated/ folder will now contain proper configuration files.

Open the DemoApplication class, and Run/Debug its main method from your IDE.

Now you can open the http://localhost:8080 with your browser.

Building In Production Mode

Run the following command in this repo:

./gradlew clean build -Pvaadin.productionMode

That will build this app in production mode as a runnable jar archive; please find the jar file in build/libs/base-starter-spring-gradle*.jar. You can run the JAR file with:

cd build/libs/
java -jar base-starter-spring-gradle*.jar

Now you can open the http://localhost:8080 with your browser.

Building In Production On CI

Usually the CI images will not have node.js+npm available. However, Vaadin Gradle Plugin will download it for you automatically, there is no need for you to do anything. To build your app for production in CI, just run:

./gradlew clean build -Pvaadin.productionMode

About

Starting point for a Spring Boot based Vaadin application using Gradle build

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 81.0%
  • Java 8.5%
  • JavaScript 6.8%
  • CSS 2.1%
  • HTML 1.6%