码上敲享录 > SpringBoot常见问题详解 > springboot项目使用外置tomcat

springboot项目使用外置tomcat

上一章章节目录下一章 2019-11-16已有1148人阅读 评论(0)

springboot项目使用外置tomcat


解决方法:

1.pom.xml中添加web依赖时移除tomcat

<dependencies>

       <dependency>

           <groupId>org.springframework.boot</groupId>

           <artifactId>spring-boot-starter-web</artifactId>

           <!-- 移除嵌入式tomcat插件 -->

           <exclusions>

               <exclusion>

                   <groupId>org.springframework.boot</groupId>

                   <artifactId>spring-boot-starter-tomcat</artifactId>

               </exclusion>

           </exclusions>

       </dependency>

</dependencies>


2.打包方式是war包

<packaging>war</packaging>


这样就可以打成war包放到tomcat的webapp下运行


向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
1

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交