application-dev.yml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. --- # 监控中心配置
  2. spring.boot.admin.client:
  3. # 增加客户端开关
  4. enabled: true
  5. url: http://localhost:9090/admin
  6. instance:
  7. service-host-type: IP
  8. username: ruoyi
  9. password: 123456
  10. --- # xxl-job 配置
  11. xxl.job:
  12. # 执行器开关
  13. enabled: true
  14. # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
  15. admin-addresses: http://localhost:9100/xxl-job-admin
  16. # 执行器通讯TOKEN:非空时启用
  17. access-token: xxl-job
  18. executor:
  19. # 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
  20. appname: xxl-job-executor
  21. # 执行器端口号 执行器从9101开始往后写
  22. port: 9101
  23. # 执行器注册:默认IP:PORT
  24. address:
  25. # 执行器IP:默认自动获取IP
  26. ip:
  27. # 执行器运行日志文件存储磁盘路径
  28. logpath: ./logs/xxl-job
  29. # 执行器日志文件保存天数:大于3生效
  30. logretentiondays: 30
  31. --- # 数据源配置
  32. spring:
  33. datasource:
  34. type: com.zaxxer.hikari.HikariDataSource
  35. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  36. dynamic:
  37. # 性能分析插件(有性能损耗 不建议生产环境使用)
  38. p6spy: true
  39. # 设置默认的数据源或者数据源组,默认值即为 master
  40. primary: master
  41. # 严格模式 匹配不到数据源则报错
  42. strict: true
  43. datasource:
  44. # 主库数据源
  45. master:
  46. type: ${spring.datasource.type}
  47. driverClassName: com.mysql.cj.jdbc.Driver
  48. # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  49. # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  50. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  51. username: root
  52. password: root
  53. # 从库数据源
  54. slave:
  55. lazy: true
  56. type: ${spring.datasource.type}
  57. driverClassName: com.mysql.cj.jdbc.Driver
  58. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  59. username:
  60. password:
  61. # oracle:
  62. # type: ${spring.datasource.type}
  63. # driverClassName: oracle.jdbc.OracleDriver
  64. # url: jdbc:oracle:thin:@//localhost:1521/XE
  65. # username: ROOT
  66. # password: root
  67. # hikari:
  68. # connectionTestQuery: SELECT 1 FROM DUAL
  69. # postgres:
  70. # type: ${spring.datasource.type}
  71. # driverClassName: org.postgresql.Driver
  72. # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  73. # username: root
  74. # password: root
  75. # sqlserver:
  76. # type: ${spring.datasource.type}
  77. # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
  78. # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
  79. # username: SA
  80. # password: root
  81. hikari:
  82. # 最大连接池数量
  83. maxPoolSize: 20
  84. # 最小空闲线程数量
  85. minIdle: 10
  86. # 配置获取连接等待超时的时间
  87. connectionTimeout: 10000
  88. # 校验超时时间
  89. validationTimeout: 5000
  90. # 空闲连接存活最大时间,默认10分钟
  91. idleTimeout: 60000
  92. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  93. maxLifetime: 900000
  94. # 连接测试query(配置检测连接是否有效)
  95. connectionTestQuery: SELECT 1
  96. --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  97. spring:
  98. redis:
  99. # 地址
  100. host: localhost
  101. # 端口,默认为6379
  102. port: 6379
  103. # 数据库索引
  104. database: 0
  105. # 密码(如没有密码请注释掉)
  106. # password:
  107. # 连接超时时间
  108. timeout: 10s
  109. # 是否开启ssl
  110. ssl: false
  111. redisson:
  112. # redis key前缀
  113. keyPrefix:
  114. # 线程池数量
  115. threads: 4
  116. # Netty线程池数量
  117. nettyThreads: 8
  118. # 单节点配置
  119. singleServerConfig:
  120. # 客户端名称
  121. clientName: ${ruoyi.name}
  122. # 最小空闲连接数
  123. connectionMinimumIdleSize: 8
  124. # 连接池大小
  125. connectionPoolSize: 32
  126. # 连接空闲超时,单位:毫秒
  127. idleConnectionTimeout: 10000
  128. # 命令等待超时,单位:毫秒
  129. timeout: 3000
  130. # 发布和订阅连接池大小
  131. subscriptionConnectionPoolSize: 50
  132. --- # mail 邮件发送
  133. mail:
  134. enabled: false
  135. host: smtp.163.com
  136. port: 465
  137. # 是否需要用户名密码验证
  138. auth: true
  139. # 发送方,遵循RFC-822标准
  140. from: xxx@163.com
  141. # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  142. user: xxx@163.com
  143. # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  144. pass: xxxxxxxxxx
  145. # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  146. starttlsEnable: true
  147. # 使用SSL安全连接
  148. sslEnable: true
  149. # SMTP超时时长,单位毫秒,缺省值不超时
  150. timeout: 0
  151. # Socket连接超时值,单位毫秒,缺省值不超时
  152. connectionTimeout: 0
  153. --- # sms 短信
  154. sms:
  155. enabled: false
  156. # 阿里云 dysmsapi.aliyuncs.com
  157. # 腾讯云 sms.tencentcloudapi.com
  158. endpoint: "dysmsapi.aliyuncs.com"
  159. accessKeyId: xxxxxxx
  160. accessKeySecret: xxxxxx
  161. signName: 测试
  162. # 腾讯专用
  163. sdkAppId: