spring boot将jar包转换成war包发布

spring boot将jar包转换成war包发布步骤

  1. 将<packaging>jar</packaging>修改为<packaging>war</packaging>
  2. 增加下面的依赖覆盖默认内嵌的Tomcat依赖
           <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>

  3. 增加ServletInitializer类

上一篇:Spring boot 打成jar包问题总结


下一篇:WPF使用IDataErrorInfo进行数据校验