application-dev.yml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # 数据源配置
  2. spring:
  3. datasource:
  4. type: com.alibaba.druid.pool.DruidDataSource
  5. driverClassName: com.mysql.cj.jdbc.Driver
  6. druid:
  7. # 主库数据源
  8. master:
  9. url: jdbc:mysql://localhost:3306/yonghu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
  10. username: root
  11. password: root
  12. driverClassName: com.mysql.cj.jdbc.Driver
  13. # 从库数据源
  14. slave:
  15. # 从数据源开关/默认关闭
  16. enabled: false
  17. url: jdbc:sqlserver://192.168.2.121:port;SelectMethod=Cursor;DatabaseName=AGV
  18. username: sa
  19. password:
  20. # 初始连接数
  21. initialSize: 5
  22. # 最小连接池数量
  23. minIdle: 10
  24. # 最大连接池数量
  25. maxActive: 20
  26. # 配置获取连接等待超时的时间
  27. maxWait: 60000
  28. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  29. timeBetweenEvictionRunsMillis: 60000
  30. # 配置一个连接在池中最小生存的时间,单位是毫秒
  31. minEvictableIdleTimeMillis: 300000
  32. # 配置一个连接在池中最大生存的时间,单位是毫秒
  33. maxEvictableIdleTimeMillis: 900000
  34. # 配置检测连接是否有效
  35. validationQuery: SELECT 1 FROM DUAL
  36. testWhileIdle: true
  37. testOnBorrow: false
  38. testOnReturn: false
  39. webStatFilter:
  40. enabled: true
  41. statViewServlet:
  42. enabled: true
  43. # 设置白名单,不填则允许所有访问
  44. allow:
  45. url-pattern: /druid/*
  46. # 控制台管理用户名和密码
  47. login-username: ruoyi
  48. login-password: 123456
  49. filter:
  50. stat:
  51. enabled: true
  52. # 慢SQL记录
  53. log-slow-sql: true
  54. slow-sql-millis: 1000
  55. merge-sql: true
  56. wall:
  57. config:
  58. multi-statement-allow: true
  59. redis:
  60. # 地址
  61. host: localhost
  62. # host: 154.12.16.4
  63. # 端口,默认为6379
  64. port: 6379
  65. # 数据库索引
  66. database: 0
  67. # 密码
  68. password: 123456
  69. # password: 123499
  70. # 连接超时时间
  71. timeout: 10s
  72. lettuce:
  73. pool:
  74. # 连接池中的最小空闲连接
  75. min-idle: 0
  76. # 连接池中的最大空闲连接
  77. max-idle: 8
  78. # 连接池的最大数据库连接数
  79. max-active: 8
  80. # #连接池最大阻塞等待时间(使用负值表示没有限制)
  81. max-wait: -1ms
  82. # 日志配置
  83. logging:
  84. level:
  85. com.ruoyi: debug
  86. org.springframework: debug
  87. # 是否开启服务
  88. testtag:
  89. autosend: false
  90. aciservice: false
  91. gsService: false