目录
- 替换Tomcat中间件
- Tomcat是什么
- Spring Cloud剔除tomcat
- 引入宝兰德Application Server
- 打包运行
- 授权
替换Tomcat中间件
Tomcat是什么
Apache Tomcat (called “Tomcat” for short) is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies.[2] It provides a “pure Java” HTTP web server environment in which Java code can also run. Thus it is a Java web application server, although not a full JEE application server.
Tomcat is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation, released under the Apache License 2.0 license.
Spring Cloud剔除tomcat
<!--集成springmvc框架 -->
<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>
<optional>true</optional>
</dependency>
引入宝兰德Application Server
宝蓝德中间件的获取目前在官网是不能直接下载的,下载会提示你联系管理员;我是通过官网联系到客服,说明来意后,当地的销售人员联系我,并发送了相关中间件程序;
- 将需要的相关jar包install到本地的maven仓库,目前我只是用到了bes-lite-spring-boot-2.x-starter-9.5.5.003.jar和bes-websocket-9.5.5.003.jar
- install命令
mvn install:install-file -Dfile=./bes-lite-spring-boot-2.x-starter-9.5.5.003.jar -DgroupId=com.bes.appserv-web -DartifactId=bes-lite-spring-boot-2.x-starter -Dversion=9.5.5.003 -Dpackaging=jar
mvn install:install-file -Dfile=./bes-websocket-9.5.5.003.jar -DgroupId=com.bes.appserv-web -DartifactId=bes-websocket -Dversion=9.5.5.003 -Dpackaging=jar
- 在pom文件中引入打包的库文件
<!-- 添加宝兰德依赖-->
<dependency>
<groupId>com.bes.appserv-web</groupId>
<artifactId>bes-lite-spring-boot-2.x-starter</artifactId>
<version>9.5.5.003</version>
</dependency>
<dependency>
<groupId>com.bes.appserv-web</groupId>
<artifactId>bes-websocket</artifactId>
<version>9.5.5.003</version>
</dependency>
引入成功后,Tomcat相关的import需要做适当调整。
打包运行
目前项目就网关和系统模块两个模块,打包后正常启动
日志输出这部分内容就说明宝兰德中间件正确启动了;