文章目录
- 1. 排除tomcat依赖
- 2. 集成宝兰德依赖
- 3. 项目打包方式
- 4. 支持war部署配置
- 5. 控制台部署
1. 排除tomcat依赖
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><exclusions><!-- 适配宝兰德,移除tomcat--><exclusion><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-tomcat</artifactId></exclusion></exclusions></dependency>
2. 集成宝兰德依赖
<!-- 添加宝兰德依赖--><dependency><groupId>com.bes.appserv-web</groupId><artifactId>bes-lite-spring-boot-2.x-starter</artifactId><version>9.5.2.008</version></dependency><dependency><groupId>com.bes.appserv-web</groupId><artifactId>bes-gmssl</artifactId><version>9.5.2.008</version></dependency><dependency><groupId>com.bes.appserv-web</groupId><artifactId>bes-jasper</artifactId><version>9.5.2.008</version></dependency><dependency><groupId>com.bes.appserv-web</groupId><artifactId>bes-jdbcra</artifactId><version>9.5.2.008</version></dependency><dependency><groupId>com.bes.appserv-web</groupId><artifactId>bes-websocket</artifactId><version>9.5.2.008</version></dependency>
3. 项目打包方式
将默认jar改为war
<packaging>war</packaging>
4. 支持war部署配置
package com.gblfy.system;import com.gblfy.common.security.annotation.EnableLisFeignClients;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;/*** 系统模块** @author gblfy*/
@EnableLisFeignClients
@SpringBootApplication
public class LySystemApplication extends SpringBootServletInitializer {public static void main(String[] args) {SpringApplication.run(LySystemApplication.class, args);System.out.println("(♥◠‿◠)ノ゙ 系统模块启动成功 ლ(´ڡ`ლ)゙");}@Overrideprotected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {return builder.sources(LySystemApplication.class);}
}
5. 控制台部署
http://192.168.xxx.xxx:1900/console/