yjzh-sq-test.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. # 数据源配置
  2. spring:
  3. datasource:
  4. type: com.alibaba.druid.pool.DruidDataSource
  5. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  6. dynamic:
  7. # 性能分析插件(有性能损耗 不建议生产环境使用)
  8. p6spy: true
  9. # 设置默认的数据源或者数据源组,默认值即为 master
  10. primary: master
  11. datasource:
  12. # 主库数据源
  13. master:
  14. driverClassName: org.postgresql.Driver
  15. url: jdbc:postgresql://10.11.96.34:16430/yjzh?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
  16. username: postgres
  17. password: Superman@2021
  18. # 从库数据源
  19. # slave:
  20. # lazy: true
  21. # driverClassName: com.mysql.cj.jdbc.Driver
  22. # url:
  23. # username:
  24. # password:
  25. druid:
  26. # 初始连接数
  27. initialSize: 5
  28. # 最小连接池数量
  29. minIdle: 10
  30. # 最大连接池数量
  31. maxActive: 20
  32. # 配置获取连接等待超时的时间
  33. maxWait: 60000
  34. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  35. timeBetweenEvictionRunsMillis: 60000
  36. # 配置一个连接在池中最小生存的时间,单位是毫秒
  37. minEvictableIdleTimeMillis: 300000
  38. # 配置一个连接在池中最大生存的时间,单位是毫秒
  39. maxEvictableIdleTimeMillis: 900000
  40. # 配置检测连接是否有效
  41. validationQuery: SELECT 1
  42. testWhileIdle: true
  43. testOnBorrow: false
  44. testOnReturn: false
  45. # 注意这个值和druid原生不一致,默认启动了stat
  46. filters: stat
  47. --- # druid 配置
  48. spring:
  49. datasource:
  50. druid:
  51. webStatFilter:
  52. enabled: true
  53. statViewServlet:
  54. enabled: true
  55. # 设置白名单,不填则允许所有访问
  56. allow:
  57. url-pattern: /druid/*
  58. # 控制台管理用户名和密码
  59. login-username: ruoyi
  60. login-password: 123456
  61. filter:
  62. stat:
  63. enabled: true
  64. # 慢SQL记录
  65. log-slow-sql: true
  66. slow-sql-millis: 1000
  67. merge-sql: true
  68. wall:
  69. config:
  70. multi-statement-allow: true
  71. --- # redis 配置
  72. spring:
  73. redis:
  74. # 地址
  75. host: 10.11.96.37
  76. # 端口,默认为6379
  77. port: 6379
  78. # 数据库索引
  79. database: 10
  80. # 密码
  81. password: superman
  82. # 连接超时时间
  83. timeout: 10s
  84. # 是否开启ssl
  85. ssl: false
  86. redisson:
  87. # 线程池数量
  88. threads: 16
  89. # Netty线程池数量
  90. nettyThreads: 32
  91. # 传输模式
  92. transportMode: "NIO"
  93. # 单节点配置
  94. singleServerConfig:
  95. # 客户端名称
  96. clientName: ${ruoyi.name}
  97. # 最小空闲连接数
  98. connectionMinimumIdleSize: 32
  99. # 连接池大小
  100. connectionPoolSize: 64
  101. # 连接空闲超时,单位:毫秒
  102. idleConnectionTimeout: 10000
  103. # 命令等待超时,单位:毫秒
  104. timeout: 3000
  105. # 如果尝试在此限制之内发送成功,则开始启用 timeout 计时。
  106. retryAttempts: 3
  107. # 命令重试发送时间间隔,单位:毫秒
  108. retryInterval: 1500
  109. # 发布和订阅连接的最小空闲连接数
  110. subscriptionConnectionMinimumIdleSize: 1
  111. # 发布和订阅连接池大小
  112. subscriptionConnectionPoolSize: 50
  113. # 单个连接最大订阅数量
  114. subscriptionsPerConnection: 5
  115. # DNS监测时间间隔,单位:毫秒
  116. dnsMonitoringInterval: 5000