application-test.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # 项目相关配置
  2. ruoyi:
  3. # 名称
  4. name: RuoYi
  5. # 版本
  6. version: 3.8.6
  7. # 版权年份
  8. copyrightYear: 2023
  9. # 实例演示开关
  10. demoEnabled: false
  11. # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
  12. profile: /opt/dayun/uploadPath
  13. # 获取ip地址开关
  14. addressEnabled: false
  15. # 验证码类型 math 数字计算 char 字符验证
  16. captchaType: math
  17. spring:
  18. # redis 配置
  19. redis:
  20. # 地址
  21. host: 127.0.0.1
  22. # 端口,默认为6379
  23. port: 6379
  24. # 数据库索引
  25. database: 0
  26. # 密码
  27. password: dayun@2021!CD
  28. # 连接超时时间
  29. timeout: 10s
  30. lettuce:
  31. pool:
  32. # 连接池中的最小空闲连接
  33. min-idle: 0
  34. # 连接池中的最大空闲连接
  35. max-idle: 8
  36. # 连接池的最大数据库连接数
  37. max-active: 8
  38. # #连接池最大阻塞等待时间(使用负值表示没有限制)
  39. max-wait: -1ms
  40. # 数据源配置
  41. datasource:
  42. type: com.alibaba.druid.pool.DruidDataSource
  43. driverClassName: com.mysql.cj.jdbc.Driver
  44. druid:
  45. # 主库数据源
  46. master:
  47. url: jdbc:mysql://127.0.0.1:3306/dayun?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  48. username: root
  49. password: dayun@2021!CD
  50. # 从库数据源
  51. slave:
  52. # 从数据源开关/默认关闭
  53. enabled: false
  54. url:
  55. username:
  56. password:
  57. # 初始连接数
  58. initialSize: 5
  59. # 最小连接池数量
  60. minIdle: 10
  61. # 最大连接池数量
  62. maxActive: 20
  63. # 配置获取连接等待超时的时间
  64. maxWait: 60000
  65. # 配置连接超时时间
  66. connectTimeout: 30000
  67. # 配置网络超时时间
  68. socketTimeout: 60000
  69. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  70. timeBetweenEvictionRunsMillis: 60000
  71. # 配置一个连接在池中最小生存的时间,单位是毫秒
  72. minEvictableIdleTimeMillis: 300000
  73. # 配置一个连接在池中最大生存的时间,单位是毫秒
  74. maxEvictableIdleTimeMillis: 900000
  75. # 配置检测连接是否有效
  76. validationQuery: SELECT 1 FROM DUAL
  77. testWhileIdle: true
  78. testOnBorrow: false
  79. testOnReturn: false
  80. webStatFilter:
  81. enabled: true
  82. statViewServlet:
  83. enabled: true
  84. # 设置白名单,不填则允许所有访问
  85. allow:
  86. url-pattern: /druid/*
  87. # 控制台管理用户名和密码
  88. login-username: ruoyi
  89. login-password: 123456
  90. filter:
  91. stat:
  92. enabled: true
  93. # 慢SQL记录
  94. log-slow-sql: true
  95. slow-sql-millis: 1000
  96. merge-sql: true
  97. wall:
  98. config:
  99. multi-statement-allow: true