2 回答

TA贡献1880条经验 获得超4个赞
添加tomcat依赖以部署war..
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<tomcat.version>9.0.12</tomcat.version>不需要删除。
通过运行清理您的项目 mvn clean install
如果仍然存在冲突的嵌入式 tomcat jar 问题,那么也从 web 中排除 tomcat。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
添加回答
举报