spring boot将jar包转换成war包发布步骤
- 将<packaging>jar</packaging>修改为<packaging>war</packaging>
- 增加下面的依赖覆盖默认内嵌的Tomcat依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency>
3. 增加ServletInitializer类