javaspring-bootproduction-environmentrunnable-jar

Spring Boot runnable Jar file for production?


Is spring boot runnable jar file meant for production environments with any optimizations needed for production or it is meant for testing/prototyping and we should generate and deploy WAR files on app servers in the prod machines?


Solution

  • You can use the .jar for production too. Jars are easy to create. Spring boot jar can simply be managed automatically by the production server, i.e. restart the jar and etc.

    It also has embedded Tomcat and the Tomcat configuration can be modified and optimized using the .properties file or inside Java if you need that.

    Generally, there are almost no reason to use .war over .jar, but it is up to you what you prefer.