Spring Boot package web application to .jar

后端 未结 3 1219
孤街浪徒
孤街浪徒 2021-02-13 15:11

Why Spring Boot by default packaging web applications as .jar ? Are there any advantages over .war ?

Shouldn\'t be all web applications packed as .war i

3条回答
  •  醉梦人生
    2021-02-13 15:41

    I think whole point of springboot is speed of development with minimal configuration. So you may think that they provide out of the box solution , that server(tomcat or jetty ) is embedded in the jar.

    Also micro-services on cloud are promoting embedded server in jar only so that server can be optimized for application only and there is no need to setup tomcat server for small application.

    If you want you can create war of spring boot application
    https://docs.spring.io/spring-boot/docs/current/reference/html/howto-traditional-deployment.html

提交回复
热议问题