[英]Difference between Jar and War packaging with embedded Tomcat
Spring Boot can build executable .jar
or .war
files. Spring Boot可以构建可执行的
.jar
或.war
文件。 Is there any difference between them, besides the file extension? 除文件扩展名外,它们之间有什么区别吗?
The documentation states You should configure your project to build a jar or war (as appropriate)
. 文档说明
You should configure your project to build a jar or war (as appropriate)
。 For a Spring MVC web application, is in inappropriate (for technical reasons) to build an executable .jar
instead of an executable .war
? 对于Spring MVC Web应用程序,由于技术原因而不适合构建可执行文件
.jar
而不是可执行文件.war
?
Generally speaking, when you're using an embedded container, you should stick to the defaults and build a jar file. 一般来说,当您使用嵌入式容器时,您应该坚持使用默认值并构建一个jar文件。
There are, however, two exceptions to that rule: 但是,该规则有两个例外:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.