You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.2 KiB
58 lines
2.2 KiB
server:
|
|
port: 8087
|
|
servlet:
|
|
context-path: /api
|
|
spring:
|
|
datasource:
|
|
dynamic:
|
|
primary: db1
|
|
strict: false
|
|
datasource:
|
|
db1:
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
type: com.zaxxer.hikari.HikariDataSource
|
|
url: jdbc:mysql://localhost:3306/device_system?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&serverTimezone=Asia/Shanghai&useSSL=false
|
|
username: root
|
|
password: root
|
|
db2:
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
type: com.zaxxer.hikari.HikariDataSource
|
|
url: jdbc:mysql://localhost:3306/image_analysis_zs?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&serverTimezone=Asia/Shanghai&useSSL=false
|
|
username: root
|
|
password: root
|
|
db3:
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
type: com.zaxxer.hikari.HikariDataSource
|
|
url: jdbc:mysql://localhost:3306/modbusrtu?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&serverTimezone=Asia/Shanghai&useSSL=false
|
|
username: root
|
|
password: root
|
|
#Hikari连接池配置
|
|
hikari:
|
|
#池中维护的最小空闲连接数
|
|
minimum-idle: 5
|
|
#池中最大连接数,包括闲置和使用中的连接
|
|
maximum-pool-size: 15
|
|
#自动提交从池中返回的连接
|
|
auto-commit: true
|
|
#连接允许在池中闲置的最长时间
|
|
idle-timeout: 30000
|
|
#连接池的用户定义名称,主要出现在日志记录和JMX管理控制台中以识别池和池配置
|
|
pool-name: DatebookHikariCP
|
|
#池中连接最长生命周期
|
|
max-lifetime: 18000000
|
|
#等待来自池的连接的最大毫秒数
|
|
connection-timeout: 30000
|
|
#验证该连接是否是有效的查询语句
|
|
connection-test-query: select 1 from dual
|
|
|
|
eureka:
|
|
instance:
|
|
instance-id: ${spring.cloud.client.ip-address}:${server.port}
|
|
prefer-ip-address: true
|
|
client:
|
|
healthcheck:
|
|
enabled: true
|
|
service-url:
|
|
defaultZone: http://localhost:8084/eureka
|
|
device:
|
|
deviceId: 3
|