把Springboot打包成war
2017-04-28 本文已影响0人
RageYourDream_
让main函数所在的启动类继承SpringBootServletInitializer并重写configure方法
return builder.sources(YourApplication.class);
加入tomcat依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency>