Skip to content

Latest commit

 

History

History
74 lines (51 loc) · 2.29 KB

README.md

File metadata and controls

74 lines (51 loc) · 2.29 KB

Vaadin Gradle Skeleton Starter Spring Boot

This project demoes the possibility of having Vaadin 14 project in npm+webpack mode using Gradle and Spring Boot. Please see the Vaadin Gradle Plugin Page for documentation.

Prerequisites:

  • Java 8 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 17

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