13.打包发布

 <packaging>war</packaging>
       <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
@SpringBootApplication(scanBasePackages = {"com.fly"})
public class SpringDemoApp extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(SpringDemoApp.class);
    }
    public static void main(String[] args){
        SpringApplication.run(SpringDemoApp.class,args);
    }
}
posted @ 2019-10-04 14:04  fly_bk  阅读(150)  评论(0编辑  收藏  举报