springboot项目打包成war包
2021-01-19 10:14
标签:pid info prot app 执行 ati 文件中 tin ica 2、移除springboot自带的tomcat 3、在启动类上继承SpringBootServletInitializer 添加以下内容 @SpringBootApplication@EnableScheduling public static void main(String[] args) { /将springboot项目打包成war/ } 4. maven clean springboot项目打包成war包 标签:pid info prot app 执行 ati 文件中 tin ica 原文地址:https://blog.51cto.com/14802795/2495979
spring-boot-starter-tomcat
br/>@EnableScheduling
public class JavaSayApplication extends SpringBootServletInitializer {
SpringApplication.run(JavaSayApplication.class, args);
}
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
// 注意这里要指向原先用main方法执行的Application启动类
return builder.sources(JavaSayApplication.class);
}
maven package
文章标题:springboot项目打包成war包
文章链接:http://soscw.com/index.php/essay/44035.html