pom.xml
<packaging>war</packaging>
<!-- 打包设置 -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>sale</warName>
</configuration>
</plugin>
</plugins>
springboot 启动类 继承 SpringBootServletInitializer 实现 SpringApplicationBuilder 接口
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(启动类.class);
}