一、集成东方通
1.1 去掉tomcat依赖,增加tongweb依赖
<!-- 去掉tomcat依赖 -->
<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>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-websocket</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 添加东方通依赖 -->
<dependency>
<groupId>com.tongweb.springboot</groupId>
<artifactId>tongweb-spring-boot-starter</artifactId>
<version>2.x.0.RELEASE</version>
</dependency>
<dependency>
<groupId>com.tongweb</groupId>
<artifactId>tongweb-embed</artifactId>
<version>7.0.E.1</version>
</dependency>
<dependency>
<groupId>com.tongweb</groupId>
<artifactId>tongweb-jsp</artifactId>
<version>7.0.E.1</version>
</dependency>
1.2 增加tongweb的license配置
server:
tongweb:
license:
type: false
path: D:\\opt\\tongweb-license\\license.dat
二、集成宝兰德
2.1 去掉tomcat依赖,增加bes依赖
<!-- 去掉tomcat依赖 -->
<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>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-websocket</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 添加宝兰德依赖 -->
<dependency>
<groupId>com.bes.besstarter</groupId>
<artifactId>bes-lite-spring-boot-2.x-starter</artifactId>
<version>9.5.2</version>
</dependency>
<dependency>
<groupId>com.bes.besstarter</groupId>
<artifactId>bes-actuator-spring-boot-2.x-starter</artifactId>
<version>9.5.2</version>
</dependency>
<dependency>
<groupId>com.bes.besstarter</groupId>
<artifactId>bes-jasper</artifactId>
<version>9.5.2</version>
</dependency>
<dependency>
<groupId>com.bes.besstarter</groupId>
<artifactId>bes-jdbcra</artifactId>
<version>9.5.2</version>
</dependency>
三、集成达梦数据库
3.1 添加达梦数据库依赖
<!-- 添加达梦数据库驱动包依赖 -->
<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmJdbcDriver</artifactId>
<version>18.0.0.RELEASE</version>
</dependency>
3.2 添加数据库连接配置
spring:
datasource:
driver-class-name: dm.jdbc.driver.DmDriver
url: jdbc:dm://10.x.x.x:5236?STU&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&localTimezone=480
username: username
password: password
# 初始化建立物理连接的个数
initial-size: 10
# 最大连接池数量
max-active: 100
#获取连接的最大等待时间
max-wait: 30000
#是否缓存preparedStatements
pool-preparedStatements: true
# 空闲时测试连接
test-while-idle: true
# 监控统计用插件stat,防注入用wall(引入druid数据库连接池时不能使用wall)
filter: stat
3.3 解决quartz定时器使用达梦数据库的兼容问题
spring:
quartz:
properties:
org:
quartz:
scheduler:
instanceName: xxx
# ID设为自动获取,每一个必须不同(所有调度器实例中是唯一的)
instanceId: AUTO
jobStore:
class: org.quartz.impl.jdbcjobstore.JobStoreTX
# StdJDBCDeleagate说明支持集群,兼容达梦数据库
driverDeleagateClass: org.quartz.impl.jdbcjobstore.StdJDBCDeleagate
# quartz内部表的前缀
tablePrefix: QRTZ_
# 是否加入集群
isClustered: true
# 集群检查时间
clusterCheckinInterval: 10000
# 兼容达梦数据库
useProperties: false
# 容许的最大作业延长时间
misfireThreshold: 6000
# 线程池配置
threadPool:
class: org.quartz.simpl.SimpleThreadPool
# 线程数量
threadCount: 10
# 线程优先级
threadPriortity: 5
threadsInheritContextClassLoaderOfIntializingThread: true
# 存储方式
job-store-type: jdbc
# 制定quartz任务组名,多个组用逗号分隔
# 如果不同实例加载不同任务,请启用mq,默认会为每个任务组声明队列
# 格式为:"quartz_job_任务组名",便于处理quartz页面接口,请注意取名不要与mq声明的队列重复
jobGroups: xxx
文章来源地址https://www.toymoban.com/news/detail-544244.html
文章来源:https://www.toymoban.com/news/detail-544244.html
到了这里,关于springboot集成信创东方通或宝兰德,及达梦数据库的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!