介绍 继承SpringBootServletInitializer并重写configure方法 spring-boot-starter-tomcat的scope改为provided 打包方式改为war <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat