application-druid.yml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. # 数据源配置
  2. spring:
  3. # redis 配置
  4. redis:
  5. # 地址 localhost
  6. host: 127.0.0.1
  7. # 端口,默认为6379
  8. port: 6379
  9. # 数据库索引
  10. database: 0
  11. # 密码
  12. password:
  13. # password:
  14. # 连接超时时间
  15. timeout: 10s
  16. lettuce:
  17. pool:
  18. # 连接池中的最小空闲连接
  19. min-idle: 0
  20. # 连接池中的最大空闲连接
  21. max-idle: 8
  22. # 连接池的最大数据库连接数
  23. max-active: 8
  24. # #连接池最大阻塞等待时间(使用负值表示没有限制)
  25. max-wait: -1ms
  26. datasource:
  27. # clickhouse:
  28. # type: com.alibaba.druid.pool.DruidDataSource
  29. # driverClassName: com.clickhouse.jdbc.ClickHouseDriver
  30. # url: jdbc:clickhouse://cc-2vc8zzo26w0l7m2l6.public.clickhouse.ads.aliyuncs.com/sop?compress=0&use_server_time_zone=true&use_client_time_zone=false&timezone=Asia/Shanghai
  31. # username: rt_2024
  32. # password: Yzx_19860213
  33. # initialSize: 10
  34. # maxActive: 100
  35. # minIdle: 10
  36. # maxWait: 6000
  37. mysql:
  38. type: com.alibaba.druid.pool.DruidDataSource
  39. driverClassName: com.mysql.cj.jdbc.Driver
  40. druid:
  41. # 主库数据源
  42. master:
  43. url: jdbc:mysql://gz-cdb-f32osvnt.sql.tencentcdb.com:25835/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  44. username: Rtyy_2023
  45. password: test_123456
  46. # 从库数据源
  47. slave:
  48. url: jdbc:mysql://gz-cdb-f32osvnt.sql.tencentcdb.com:25835/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  49. username: Rtyy_2023
  50. password: test_123456
  51. # 初始连接数
  52. initialSize: 5
  53. # 最小连接池数量
  54. minIdle: 10
  55. # 最大连接池数量
  56. maxActive: 20
  57. # 配置获取连接等待超时的时间
  58. maxWait: 60000
  59. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  60. timeBetweenEvictionRunsMillis: 60000
  61. # 配置一个连接在池中最小生存的时间,单位是毫秒
  62. minEvictableIdleTimeMillis: 300000
  63. # 配置一个连接在池中最大生存的时间,单位是毫秒
  64. maxEvictableIdleTimeMillis: 900000
  65. # 配置检测连接是否有效
  66. validationQuery: SELECT 1 FROM DUAL
  67. testWhileIdle: true
  68. testOnBorrow: false
  69. testOnReturn: false
  70. webStatFilter:
  71. enabled: true
  72. statViewServlet:
  73. enabled: true
  74. # 设置白名单,不填则允许所有访问
  75. allow:
  76. url-pattern: /druid/*
  77. # 控制台管理用户名和密码
  78. login-username: fs
  79. login-password: 123456
  80. filter:
  81. stat:
  82. enabled: true
  83. # 慢SQL记录
  84. log-slow-sql: true
  85. slow-sql-millis: 1000
  86. merge-sql: true
  87. wall:
  88. config:
  89. multi-statement-allow: true
  90. sop:
  91. type: com.alibaba.druid.pool.DruidDataSource
  92. driverClassName: com.mysql.cj.jdbc.Driver
  93. druid:
  94. # 主库数据源
  95. master:
  96. url: jdbc:mysql://gz-cdb-of55khc9.sql.tencentcdb.com:23620/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  97. username: root
  98. password: Rtyy_2023
  99. read:
  100. url: jdbc:mysql://gz-cdb-of55khc9-readonly.sql.tencentcdb.com:22522/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  101. username: root
  102. password: Rtyy_2023
  103. # 初始连接数
  104. initialSize: 5
  105. # 最小连接池数量
  106. minIdle: 10
  107. # 最大连接池数量
  108. maxActive: 20
  109. # 配置获取连接等待超时的时间
  110. maxWait: 60000
  111. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  112. timeBetweenEvictionRunsMillis: 60000
  113. # 配置一个连接在池中最小生存的时间,单位是毫秒
  114. minEvictableIdleTimeMillis: 300000
  115. # 配置一个连接在池中最大生存的时间,单位是毫秒
  116. maxEvictableIdleTimeMillis: 900000
  117. # 配置检测连接是否有效
  118. validationQuery: SELECT 1 FROM DUAL
  119. testWhileIdle: true
  120. testOnBorrow: false
  121. testOnReturn: false
  122. webStatFilter:
  123. enabled: true
  124. statViewServlet:
  125. enabled: true
  126. # 设置白名单,不填则允许所有访问
  127. allow:
  128. url-pattern: /druid/*
  129. # 控制台管理用户名和密码
  130. login-username: fs
  131. login-password: 123456
  132. filter:
  133. stat:
  134. enabled: true
  135. # 慢SQL记录
  136. log-slow-sql: true
  137. slow-sql-millis: 1000
  138. merge-sql: true
  139. wall:
  140. config:
  141. multi-statement-allow: true
  142. rocketmq:
  143. name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
  144. producer:
  145. group: my-producer-group
  146. access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
  147. secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
  148. consumer:
  149. group: common-group
  150. access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
  151. secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey