Running an Application
After you have imported an application into your IDE, you’re ready to run it. Applications created with Vaadin Start are Spring Boot applications, which you can run like ordinary Java applications. Non-Spring Boot applications can be run with Maven.
With a Spring Boot application like the ones created with Vaadin Start, you run the Application
class in the project. This launches an embedded server to run the application.
Many IDEs also support debugging Java applications. Debugging is similar to running an application normally, but it takes place in debug mode in the IDE.
Running with Maven
During development, you can run a Vaadin application in an embedded web server by executing one of the Maven goals:
Technology Stack | Embedded Server | Goal to Run |
---|---|---|
Spring Boot | – |
|
CDI / Java EE | Apache TomEE |
|
Plain Java | Jetty |
|
Redeploying during Development
When you save a source file, the IDE automatically compiles it. The web server tracks the compiled files and automatically redeploys the application when it notices a change. You can then refresh the page to use the updated version.
You can also enable live reload to have the page refreshed automatically, as described in Live Reload.
Debugging
Many IDEs also support debugging Java applications. Debugging is similar to running an application normally, but it takes place in debug mode in the IDE.
Note
|
Debugging Spring Boot Applications
You can debug Spring Boot applications by running them as Java applications. However, this isn’t possible with Maven using spring-boot:run . The Maven goal starts the application in a separate process, so you can’t debug it.
|