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类

 

posted @ 2017-04-26 00:11  kevin_shen  阅读(1177)  评论(0编辑  收藏  举报