No longer needed, due to the EOL of Vaadin 8 - For Flow see https://codeberg.org/cfrick/vaadin-flow-springboot-gradle-bootstrap
Ready to rock starter/sample project to get going a Vaadin app using Groovy.
This uses by default:
- Groovy for quick results
- Gradle for building
- Vaadin for the web GUI
- Spring Boot for
bootRun
andjar
capabilities- Vaadin Spring to make Spring and Vaadin play together
- Gradle Vaadin Plugin for style and widgetset compilation
- Spock for tests
Like many other starters or bootstraps, this project makes some assumptions,
what is needed and where it is. The focus is to have an easy way to build web
apps using Vaadin 8 and Groovy 2.4 on Java 8, run it for development and build
a fat jar for deployment. (Note, that support for Vaadin 7 moved in the
discontinued branch vaadin-7
).
It configures a theme and a widgetset right away (both named app
). The
theme derives from Valo. There is a spring profile named dev
to gather
configs (like to tell Vaadin, it is not in production mode) for development.
Checking the starter out into directory app
and get rid of the origin.
git clone https://github.com/christoph-frick/springboot-groovy-vaadin-starter app
cd app
# git remote rm origin # get rid of the origin so you can add your own
# git reset $(git commit-tree HEAD^{tree} -m "bootstrap") # squash all commits into one
./gradlew bootRun
# check http://localhost:8080
Build a fat jar and run it:
./gradlew build
java -jar build/libs/app.jar
This this is using spring-boot-devtools
to handle the reloading of live changes.
If you run run dev in debug mode you can then simply run reload to update
changes to the running process, while keeping the container running as long as
possible.
build.gradle : | Versions and general setup of the project and the name of
the widgetset used to auto-generate/-update and used with
@Widgetset('app') in AppUI . |
---|---|
gradle/groovyOptions.groovy : | Default config for the groovy compiler.
@CompileStatic is enabled by default. |
src/main/groovy/app/Application.groovy : | main and Spring Boot setup |
src/main/groovy/app/ui/AppUI.groovy : | Trivial UI with the theme and widgetset. |
src/main/resources/VAADIN/themes/app/ : | The theme used with
@Theme('app') in AppUI . |
src/main/resources/application.yaml : | Application config and Spring
profile dev defined. |
src/main/resources/logback.xml : | Default logging with package app set
to DEBUG |