Spring Boot 打 war 包的步骤
标签:uil lse ted group `` VID depend err artifact
## Spring Boot 打 war 包的步骤
1. 添加 spring-boot-start-tomcat 的 provided 依赖
```
org.springframework.boot
spring-boot-starter-tomcat
provided
```
2. 添加 maven-war-plugin 插件
```
org.apache.maven.plugins
maven-war-plugin
false
```
3. 继承 SpringBootServletInitializer, 重写 config 方法
```
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(MainApplication.class);
}
```
Spring Boot 打 war 包的步骤
标签:uil lse ted group `` VID depend err artifact
原文地址:https://www.cnblogs.com/facous/p/9597202.html
评论