|
@@ -1,2 +1,106 @@
|
|
|
server:
|
|
|
port: 9999
|
|
|
+spring:
|
|
|
+ datasource:
|
|
|
+ cps:
|
|
|
+ type: com.alibaba.druid.pool.DruidDataSource
|
|
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
+ jdbc-url: jdbc:mysql://121.41.100.198:3306/test_cps?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
|
|
|
+ username: root
|
|
|
+ password: root
|
|
|
+ #下面为连接池补充设置
|
|
|
+ druid:
|
|
|
+ initial-size: 5 # 初始化
|
|
|
+ max-active: 5 # 最大
|
|
|
+ min-idle: 5 # 最小
|
|
|
+ max-wait: 6000 # 超时时间
|
|
|
+ time-between-eviction-runs-millis: 60000 # 每分钟检查一次空闲链接
|
|
|
+ min-evictable-idle-time-millis: 300000 # 空闲链接可以保持多久而不被驱逐
|
|
|
+ # 检测链接是否有效的query
|
|
|
+ validation-query: SELECT 1 FROM DUAL
|
|
|
+ test-while-idle: true # 检测到链接空闲时,验证是否有效
|
|
|
+ test-on-borrow: false # 申请链接时,不检测
|
|
|
+ test-on-return: false # 返回链接时,不检测
|
|
|
+ pool-prepared-statements: false # 是否缓存preparedStatement,oracle打开,mysql关闭
|
|
|
+ # 如果上面开启了游标,这里要设置一下大小,例如 50
|
|
|
+ max-pool-prepared-statement-per-connection-size: -1
|
|
|
+ # 统计、监控配置
|
|
|
+ filters: stat,wall # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
|
|
+ # 合并执行的相同sql,避免因为参数不同而统计多条sql语句;开启慢sql记录
|
|
|
+ connect-properties: config.stat.mergeSql=true;config.stat.slowSqlMillis=500
|
|
|
+ use-global-data-source-stat: true # 合并多个DruidDataSource的监控数据
|
|
|
+ stat-view-servlet:
|
|
|
+ enabled: true
|
|
|
+ login-username: tianyun
|
|
|
+ login-password: tianyunperfect
|
|
|
+ allow: # 默认运行所有
|
|
|
+ deny: # 默认即可
|
|
|
+ reset-enable: true
|
|
|
+ polar:
|
|
|
+ type: com.alibaba.druid.pool.DruidDataSource
|
|
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
+ jdbc-url: jdbc:mysql://121.41.100.198:3306/polar?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
|
|
|
+ username: root
|
|
|
+ password: root
|
|
|
+ #下面为连接池补充设置
|
|
|
+ druid:
|
|
|
+ initial-size: 5 # 初始化
|
|
|
+ max-active: 5 # 最大
|
|
|
+ min-idle: 5 # 最小
|
|
|
+ max-wait: 6000 # 超时时间
|
|
|
+ time-between-eviction-runs-millis: 60000 # 每分钟检查一次空闲链接
|
|
|
+ min-evictable-idle-time-millis: 300000 # 空闲链接可以保持多久而不被驱逐
|
|
|
+ # 检测链接是否有效的query
|
|
|
+ validation-query: SELECT 1 FROM DUAL
|
|
|
+ test-while-idle: true # 检测到链接空闲时,验证是否有效
|
|
|
+ test-on-borrow: false # 申请链接时,不检测
|
|
|
+ test-on-return: false # 返回链接时,不检测
|
|
|
+ pool-prepared-statements: false # 是否缓存preparedStatement,oracle打开,mysql关闭
|
|
|
+ # 如果上面开启了游标,这里要设置一下大小,例如 50
|
|
|
+ max-pool-prepared-statement-per-connection-size: -1
|
|
|
+ # 统计、监控配置
|
|
|
+ filters: stat,wall # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
|
|
+ # 合并执行的相同sql,避免因为参数不同而统计多条sql语句;开启慢sql记录
|
|
|
+ connect-properties: config.stat.mergeSql=true;config.stat.slowSqlMillis=500
|
|
|
+ use-global-data-source-stat: true # 合并多个DruidDataSource的监控数据
|
|
|
+ stat-view-servlet:
|
|
|
+ enabled: true
|
|
|
+ login-username: tianyun
|
|
|
+ login-password: tianyunperfect
|
|
|
+ allow: # 默认运行所有
|
|
|
+ deny: # 默认即可
|
|
|
+ reset-enable: true
|
|
|
+ cpsshard:
|
|
|
+ type: com.alibaba.druid.pool.DruidDataSource
|
|
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
+ jdbc-url: jdbc:mysql://121.41.100.198:3306/test_cps_shard_192?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
|
|
|
+ username: root
|
|
|
+ password: root
|
|
|
+ #下面为连接池补充设置
|
|
|
+ druid:
|
|
|
+ initial-size: 5 # 初始化
|
|
|
+ max-active: 5 # 最大
|
|
|
+ min-idle: 5 # 最小
|
|
|
+ max-wait: 6000 # 超时时间
|
|
|
+ time-between-eviction-runs-millis: 60000 # 每分钟检查一次空闲链接
|
|
|
+ min-evictable-idle-time-millis: 300000 # 空闲链接可以保持多久而不被驱逐
|
|
|
+ # 检测链接是否有效的query
|
|
|
+ validation-query: SELECT 1 FROM DUAL
|
|
|
+ test-while-idle: true # 检测到链接空闲时,验证是否有效
|
|
|
+ test-on-borrow: false # 申请链接时,不检测
|
|
|
+ test-on-return: false # 返回链接时,不检测
|
|
|
+ pool-prepared-statements: false # 是否缓存preparedStatement,oracle打开,mysql关闭
|
|
|
+ # 如果上面开启了游标,这里要设置一下大小,例如 50
|
|
|
+ max-pool-prepared-statement-per-connection-size: -1
|
|
|
+ # 统计、监控配置
|
|
|
+ filters: stat,wall # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
|
|
+ # 合并执行的相同sql,避免因为参数不同而统计多条sql语句;开启慢sql记录
|
|
|
+ connect-properties: config.stat.mergeSql=true;config.stat.slowSqlMillis=500
|
|
|
+ use-global-data-source-stat: true # 合并多个DruidDataSource的监控数据
|
|
|
+ stat-view-servlet:
|
|
|
+ enabled: true
|
|
|
+ login-username: tianyun
|
|
|
+ login-password: tianyunperfect
|
|
|
+ allow: # 默认运行所有
|
|
|
+ deny: # 默认即可
|
|
|
+ reset-enable: true
|