Spring Cloud切换内嵌Tomcat为宝兰德Application Server

目录

  • 替换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

        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-webartifactId>
            <exclusions>
                
                <exclusion>
                    <groupId>org.springframework.bootgroupId>
                    <artifactId>spring-boot-starter-tomcatartifactId>
                exclusion>
            exclusions>
            <optional>trueoptional>
        dependency>

引入宝兰德Application Server

宝蓝德中间件的获取目前在官网是不能直接下载的,下载会提示你联系管理员;我是通过官网联系到客服,说明来意后,当地的销售人员联系我,并发送了相关中间件程序;
Spring Cloud切换内嵌Tomcat为宝兰德Application Server_第1张图片

  • 将需要的相关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-webgroupId>
			<artifactId>bes-lite-spring-boot-2.x-starterartifactId>
			<version>9.5.5.003version>
		dependency>
		<dependency>
			<groupId>com.bes.appserv-webgroupId>
			<artifactId>bes-websocketartifactId>
			<version>9.5.5.003version>
		dependency>

引入成功后,Tomcat相关的import需要做适当调整。

打包运行

目前项目就网关和系统模块两个模块,打包后正常启动
Spring Cloud切换内嵌Tomcat为宝兰德Application Server_第2张图片
日志输出这部分内容就说明宝兰德中间件正确启动了;

授权

你可能感兴趣的:(spring,cloud,tomcat,宝兰德)