解决方案
1.禁用springboot内部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> <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> <version>3.1.0</version> </dependency>
2.
public class SpringBootStartApplication extends SpringBootServletInitializer {}
改成public class SpringBootStartApplication{}
注:看好多人写到使用1+修改tomcat server.xml方式,
<Host name=“localhost” appBase="" unpackWARs=“true” autoDeploy=“true”>
可能是某些配置不一样,这样修改并未解决问题,
禁用tomcat+去掉extends SpringBootServletInitializer解决了问题,原理后续补充