Springboot打包war

pom:

1.<packaging>war</packaging>

2.<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency>

Application:

从SpringBootServletInitializer派生

重写configure方法:

return application.sources(xxxApplication.class);

posted @ 2018-03-27 12:39  朋克  阅读(136)  评论(0编辑  收藏  举报