application-dev.yml 6.1 KB

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