标签:boot [] protected conf UI artifact 方法 dma rri
1.在 maven的 pom 中添加
<packaging>war</packaging>
2. 修改tomcat 依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency>
3. 主类继承 SpringBootServletInitializer,实现 configure 方法
@SpringBootApplication public class Application extends SpringBootServletInitializer{ @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(JobManagementApplication.class); } public static void main(String[] args) { SpringApplication.run(JobManagementApplication.class, args); } }
4.打包
mvn clean package -Dmaven.test.skip=true
标签:boot [] protected conf UI artifact 方法 dma rri
原文地址:https://www.cnblogs.com/appleat/p/9103288.html