Spring Boot--war发布

启动main类继承SpringBootServletInitializer,并重写“protected SpringApplicationBuilder configure(SpringApplicationBuilder builder)” 方法即可,

修改pom.xml,把<packaging>jar</packaging>修改为<packaging>war</packaging>

有如下依赖包:

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

上一篇:elasticsearch 导入基础数据并索引之 geo_shape


下一篇:android fragment 的用法以及与activity的交互和保存数据的方法,包括屏幕切换(转载)!