spring boot war

<dependency>

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

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

  <scope>provided</scope>

</dependency>

替换成

<dependency>

  <groupId>javax.servlet</groupId>

  <artifactId>javax.servlet-api</artifactId>  

  <scope>provided</scope>

</dependency>

<dependency>

  <groupId>org.apache.tomcat</groupId>

  <artifactId>tomcat-servlet-api</artifactId>  

  <scope>provided</scope>

</dependency>

mvn clean package -Dmaven.test.skip=true

原文地址:https://www.cnblogs.com/GodZhe/p/10892967.html