application-druid.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # 数据源配置
  2. spring:
  3. # redis 配置
  4. redis:
  5. # 地址
  6. host: 127.0.0.1
  7. # 端口,默认为6379
  8. port: 6379
  9. # 密码
  10. password:
  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. type: com.alibaba.druid.pool.DruidDataSource
  26. driverClassName: com.mysql.cj.jdbc.Driver
  27. druid:
  28. # 主库数据源
  29. master:
  30. url: jdbc:mysql://172.30.0.8:3306/fs_hospital?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  31. username: root
  32. password: Rtyy_2023
  33. # 从库数据源
  34. slave:
  35. # 从数据源开关/默认关闭
  36. enabled: false
  37. url:
  38. username:
  39. password:
  40. # 初始连接数
  41. initialSize: 5
  42. # 最小连接池数量
  43. minIdle: 10
  44. # 最大连接池数量
  45. maxActive: 20
  46. # 配置获取连接等待超时的时间
  47. maxWait: 60000
  48. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  49. timeBetweenEvictionRunsMillis: 60000
  50. # 配置一个连接在池中最小生存的时间,单位是毫秒
  51. minEvictableIdleTimeMillis: 300000
  52. # 配置一个连接在池中最大生存的时间,单位是毫秒
  53. maxEvictableIdleTimeMillis: 900000
  54. # 配置检测连接是否有效
  55. validationQuery: SELECT 1 FROM DUAL
  56. testWhileIdle: true
  57. testOnBorrow: false
  58. testOnReturn: false
  59. webStatFilter:
  60. enabled: true
  61. statViewServlet:
  62. enabled: true
  63. # 设置白名单,不填则允许所有访问
  64. allow:
  65. url-pattern: /druid/*
  66. # 控制台管理用户名和密码
  67. login-username:
  68. login-password:
  69. filter:
  70. stat:
  71. enabled: true
  72. # 慢SQL记录
  73. log-slow-sql: true
  74. slow-sql-millis: 1000
  75. merge-sql: true
  76. wall:
  77. config:
  78. multi-statement-allow: true
  79. socket:
  80. url: https://im.yjf.runtzh.com/sendInfo
  81. #qwConfig:
  82. # apiurl: http://219.152.201.216:15201