application-druid-fby.yml 5.6 KB

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