东方通(tongweb)替换springboot内置tomcat

最近公司的的产品需要用国产化组件,我们的项目原来使用的是springboot内置的tomcat,需要用tongweb做替换。

1.首先tongweb不是免费的,需要向东方通购买

2.通过东方通提供的压缩包(我们的版本是TongWeb8.0.E.1),我们先打开

001_TongWeb_V8.0嵌入式版_JavaEE标准容器用户指南_80E1A01.pdf

3.1 按照使用说明书先安装资源jar包,按照说明书一步一步执行

3.2 修改pom文件

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <exclusions>
        <exclusion>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-tomcat</artifactId>
         </exclusion>
     </exclusions>
</dependency>
<dependency>
    <groupId>com.tongweb.springboot</groupId>
    <artifactId>tongweb-spring-boot-starter-2.x</artifactId>
    <version>${tongweb.version}</version><!--具体的tongweb版本-->
</dependency>
<!-- websocket引入 -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
    <groupId>com.tongweb.springboot</groupId>
    <artifactId>tongweb-spring-boot-websocket-2.x</artifactId>
    <version>${tongweb.version}</version>
</dependency>

其他功能按需引入

3.3 配置授权文件

license.dat文件放到 ”工程/resources“目录下

yml文件新增配置

server:
  port: 8090
  tongweb:
   license:
     type: file
     path: classpath:license.dat

4.mvn clean package打包

5.java -jar ***.jar 启动成功就说明替换完成!

  • 4
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值