Deploying to Production
- Production Mode
- Spring Boot
- Jetty
- Cloud Providers
Spring Boot applications are slightly different to plain Java web applications (or Jakarta EE applications) in that they can be configured to run either as a standard WAR file, or with an embedded server (as a JAR file). When configured with the embedded server, the build process includes a Tomcat Java server in the package that is used to run the application; the resulting JAR file does not need an external server to be installed.
Applications downloaded from vaadin.com are by default configured for JAR (embedded Tomcat) deployment. To change this, you can change jar
to war
in your pom.xml
file and then run a new build:
<packaging>jar</packaging>
The main differences between JAR and WAR packaging are as follows:
JAR packaging:
no need for a server binary install, a Java Runtime is all that is needed
limited to the Tomcat server
bigger package size
WAR packaging:
no server included, needs 3rd party binary
free choice of servers, including Jetty, Tomcat, Wildfly, Glassfish, and others
smaller package size
You can read more about Spring applications and how to deploy them at the official Spring website.