application-dev.yml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. --- # powerjob 配置
  11. powerjob:
  12. worker:
  13. # 如何开启调度中心请查看文档教程
  14. enabled: false
  15. # 需要先在 powerjob 登录页执行应用注册后才能使用
  16. app-name: ruoyi-worker
  17. enable-test-mode: false
  18. max-appended-wf-context-length: 4096
  19. max-result-length: 4096
  20. port: 27777
  21. protocol: http
  22. server-address: 127.0.0.1:7700
  23. store-strategy: disk
  24. --- # 数据源配置
  25. spring:
  26. datasource:
  27. type: com.zaxxer.hikari.HikariDataSource
  28. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  29. dynamic:
  30. # 性能分析插件(有性能损耗 不建议生产环境使用)
  31. p6spy: true
  32. # 设置默认的数据源或者数据源组,默认值即为 master
  33. primary: master
  34. # 严格模式 匹配不到数据源则报错
  35. strict: true
  36. datasource:
  37. # 主库数据源
  38. master:
  39. type: ${spring.datasource.type}
  40. driverClassName: com.mysql.cj.jdbc.Driver
  41. # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  42. # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  43. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  44. username: root
  45. password: root
  46. # 从库数据源
  47. slave:
  48. lazy: true
  49. type: ${spring.datasource.type}
  50. driverClassName: com.mysql.cj.jdbc.Driver
  51. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  52. username:
  53. password:
  54. # oracle:
  55. # type: ${spring.datasource.type}
  56. # driverClassName: oracle.jdbc.OracleDriver
  57. # url: jdbc:oracle:thin:@//localhost:1521/XE
  58. # username: ROOT
  59. # password: root
  60. # hikari:
  61. # connectionTestQuery: SELECT 1 FROM DUAL
  62. # postgres:
  63. # type: ${spring.datasource.type}
  64. # driverClassName: org.postgresql.Driver
  65. # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  66. # username: root
  67. # password: root
  68. # sqlserver:
  69. # type: ${spring.datasource.type}
  70. # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
  71. # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
  72. # username: SA
  73. # password: root
  74. hikari:
  75. # 最大连接池数量
  76. maxPoolSize: 20
  77. # 最小空闲线程数量
  78. minIdle: 10
  79. # 配置获取连接等待超时的时间
  80. connectionTimeout: 30000
  81. # 校验超时时间
  82. validationTimeout: 5000
  83. # 空闲连接存活最大时间,默认10分钟
  84. idleTimeout: 600000
  85. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  86. maxLifetime: 1800000
  87. # 连接测试query(配置检测连接是否有效)
  88. connectionTestQuery: SELECT 1
  89. # 多久检查一次连接的活性
  90. keepaliveTime: 30000
  91. --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  92. spring.data:
  93. redis:
  94. # 地址
  95. host: localhost
  96. # 端口,默认为6379
  97. port: 6379
  98. # 数据库索引
  99. database: 0
  100. # 密码(如没有密码请注释掉)
  101. # password:
  102. # 连接超时时间
  103. timeout: 10s
  104. # 是否开启ssl
  105. ssl: false
  106. redisson:
  107. # redis key前缀
  108. keyPrefix:
  109. # 线程池数量
  110. threads: 4
  111. # Netty线程池数量
  112. nettyThreads: 8
  113. # 单节点配置
  114. singleServerConfig:
  115. # 客户端名称
  116. clientName: ${ruoyi.name}
  117. # 最小空闲连接数
  118. connectionMinimumIdleSize: 8
  119. # 连接池大小
  120. connectionPoolSize: 32
  121. # 连接空闲超时,单位:毫秒
  122. idleConnectionTimeout: 10000
  123. # 命令等待超时,单位:毫秒
  124. timeout: 3000
  125. # 发布和订阅连接池大小
  126. subscriptionConnectionPoolSize: 50
  127. --- # mail 邮件发送
  128. mail:
  129. enabled: false
  130. host: smtp.163.com
  131. port: 465
  132. # 是否需要用户名密码验证
  133. auth: true
  134. # 发送方,遵循RFC-822标准
  135. from: xxx@163.com
  136. # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  137. user: xxx@163.com
  138. # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  139. pass: xxxxxxxxxx
  140. # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  141. starttlsEnable: true
  142. # 使用SSL安全连接
  143. sslEnable: true
  144. # SMTP超时时长,单位毫秒,缺省值不超时
  145. timeout: 0
  146. # Socket连接超时值,单位毫秒,缺省值不超时
  147. connectionTimeout: 0
  148. --- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
  149. # https://wind.kim/doc/start 文档地址 各个厂商可同时使用
  150. sms:
  151. # 阿里云 dysmsapi.aliyuncs.com
  152. alibaba:
  153. #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
  154. requestUrl: dysmsapi.aliyuncs.com
  155. #阿里云的accessKey
  156. accessKeyId: xxxxxxx
  157. #阿里云的accessKeySecret
  158. accessKeySecret: xxxxxxx
  159. #短信签名
  160. signature: 测试
  161. tencent:
  162. #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
  163. requestUrl: sms.tencentcloudapi.com
  164. #腾讯云的accessKey
  165. accessKeyId: xxxxxxx
  166. #腾讯云的accessKeySecret
  167. accessKeySecret: xxxxxxx
  168. #短信签名
  169. signature: 测试
  170. #短信sdkAppId
  171. sdkAppId: appid
  172. #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
  173. territory: ap-guangzhou