Explain in detail the difference between spring boot deployment jar and war

This article introduces the differences between spring boot deployment jar and war and shares them with you as follows:

1. The way of packaging is different. One is set to jar and the other is war

2. Inheritance is different

Application. Java needs to inherit springbootservletinitializer, while jar package does not.

The following is how war inherits:

3. Spring boot built-in Tomcat

Spring boot has a built-in Tomcat container. The default version is tomcat8. When deploying the war package, you need to set the scope of the jar package related to Tomcat in the POM file to provided.

Remove the built-in Tomcat code of spring boot:

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>