spring:
datasource:
url: jdbc:mysql://192.168.30.3:22032/px_basesystem_diagnosis_innet?characterEncoding=utf-8&serverTimezone=Hongkong&useSSL=true
# url: jdbc:nds://192.168.206.18:18700/v_18700_px_basesystem_fileservice?appname=App_fileservice
username: root
password: mysql-yizu
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
# driver-class-name: sgcc.nds.jdbc.driver.NdsDriver
druid:
# 初始化大小,最小,最大
initial-size: 10
min-idle: 10
max-active: 50
# 配置获取连接等待超时的时间
max-wait: 6000
#检测连接是否有效的sql
validation-query: select 1
validation-query-timeout: 60000
test-while-idle: true #申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
test-on-borrow: false #获取连接时执行检测,建议关闭,影响性能
test-on-return: false #归还连接时执行检测,建议关闭,影响性能
#是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
#是否缓存preparedStatement,mysql5.5+建议开启
pool-prepared-statements: true
#开启poolPreparedStatements后生效
max-pool-prepared-statement-per-connection-size: 20
#配置扩展插件,常用的插件有=>stat:监控统计 wall:防御sql注入
filters: stat,wall
#通过connectProperties属性来打开mergeSql功能;慢SQL记录
connection-properties: 'druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000'