springboot项目打包成war包
2021-01-19 10:13
标签:打包 spring follow extends art turn lock ota servlet 2、移除springboot自带的tomcat 3、在启动类上继承SpringBootServletInitializer 添加以下内容 @SpringBootApplication@EnableScheduling public static void main(String[] args) { /将springboot项目打包成war/ } 4. maven clean springboot项目打包成war包 标签:打包 spring follow extends art turn lock ota servlet 原文地址:https://blog.51cto.com/14802795/2495980
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
下一篇:C++流操纵算子
文章标题:springboot项目打包成war包
文章链接:http://soscw.com/index.php/essay/44032.html