Differences between jar and war in Spring Boot?

Spring Boot can be told to produce a ‘fat JAR’ which includes all of your module/service’s dependencies and can be run with java -jar <your jar>. See “Create an executable JAR with Maven” here.

Spring Boot can also be told to produce a WAR file, in which case you’ll likely choose to deploy it to a web container such as Tomcat or Jetty.

Plenty more details on Spring Boot deployment here.

Leave a Comment