yjzh-sq-dev.yaml 3.9 KB

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