Hello Vaadin
The application from the last post was a simple command-line based “Hello World”-application.
Let’s use something more sophisticated by creating a Vaadin-application.
Again, let’s create the build.gradle
file first.
mkdir hello-vaadin
cd hello-vaadin
touch build.gradle
The build.gradle
needs the following content:
plugins {
id "fi.jasoft.plugin.vaadin" version "1.1.9"
}
Now check all available tasks with gradle tasks --all
.
Let’s create a project gradle vaadinCreateProject
and then build and run it gradle vaadinRun
Browser should open under http://localhost:8080/?debug
.
Then I have change the package path to my own organization from com.example.hellovaadin
to
com.rampmeupscotty.blog.hellovaadin
via the automatic rename in IntelliJ.
Everything except one thing gets changed automatically.
The line
@WebInitParam(name="ui", value="HelloVaadinUI")
needs to be changed to
@WebInitParam(name="ui", value="com.rampmeupscotty.blog.hellovaadin.HelloVaadinUI")
Before refactoring it was
@WebInitParam(name="ui", value="com.example.hellovaadin.HelloVaadinUI")
Then head off and go through the official tutorial to get started with coding.
Not enough? Replace the demo backend of that tutorial by a real database with a tutorial offered from spring.io.
Done for today!