IT评测·应用市场-qidao123.com

标题: springboot2集成东方通tongweb嵌入式版 [打印本页]

作者: 涛声依旧在    时间: 2025-2-25 21:09
标题: springboot2集成东方通tongweb嵌入式版

首先移除springboot自带的tomcat依赖,并添加tongweb所需依赖
  1.                 <!-- SpringBoot Web容器 -->
  2.         <dependency>
  3.             <groupId>org.springframework.boot</groupId>
  4.             <artifactId>spring-boot-starter-web</artifactId>
  5.             <!--排除自带的tomcat依赖-->
  6.             <exclusions>
  7.                 <exclusion>
  8.                     <groupId>org.springframework.boot</groupId>
  9.                     <artifactId>spring-boot-starter-tomcat</artifactId>
  10.                 </exclusion>
  11.             </exclusions>
  12.         </dependency>
  13.         <!-- 添加tongweb-spring-boot-starter依赖 -->
  14.         <dependency>
  15.             <groupId>com.tongweb.springboot</groupId>
  16.             <artifactId>tongweb-spring-boot-starter-2.x</artifactId>
  17.             <version>7.0.E.6_P7</version>
  18.         </dependency>
  19.         <!-- 添加tongweb其他依赖 -->
  20.         <dependency>
  21.             <groupId>com.tongweb</groupId>
  22.             <artifactId>tongweb-embed-core</artifactId>
  23.             <version>7.0.E.6_P7</version>
  24.         </dependency>
  25.         <dependency>
  26.             <groupId>com.tongweb</groupId>
  27.             <artifactId>tongweb-embed-el</artifactId>
  28.             <version>7.0.E.6_P7</version>
  29.         </dependency>
  30.         <dependency>
  31.             <groupId>com.tongweb</groupId>
  32.             <artifactId>tongweb-javax-annotation</artifactId>
  33.             <version>1.2.1</version>
  34.         </dependency>
  35.         <dependency>
  36.             <groupId>com.tongweb</groupId>
  37.             <artifactId>tongweb-lic-sdk</artifactId>
  38.             <version>4.5.0.0</version>
  39.         </dependency>
  40.         <!-- 添加javax.servlet依赖(移除tomcat导致) -->
  41.         <dependency>
  42.             <groupId>javax.servlet</groupId>
  43.             <artifactId>javax.servlet-api</artifactId>
  44.             <version>4.0.1</version>
  45.         </dependency>
复制代码
在resources目录下上传license.dat文件,如图所示


修改application.yml配置文件中的“tomcat”改为“tongweb”,并增加license配置
  1. server:
  2.   tongweb:
  3.     uri-encoding: UTF-8
  4.     license:
  5.       type: file
  6.       path: classpath:tongweb/license.dat
复制代码

启动项目,乐成啦


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 IT评测·应用市场-qidao123.com (https://dis.qidao123.com/) Powered by Discuz! X3.4