application-dev.yml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. --- # 监控中心配置
  2. spring.boot.admin.client:
  3. # 增加客户端开关
  4. enabled: false
  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: false
  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. # 28080 端口 随着主应用端口飘逸 避免集群冲突
  22. port: 2${server.port}
  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: false
  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://${DBHOST:200.200.19.121}:${DBPORT:31000}/iotc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  51. username: ${DBUSER:root}
  52. password: ${DBPWD: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: 30000
  88. # 校验超时时间
  89. validationTimeout: 5000
  90. # 空闲连接存活最大时间,默认10分钟
  91. idleTimeout: 600000
  92. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  93. maxLifetime: 1800000
  94. # 连接测试query(配置检测连接是否有效)
  95. connectionTestQuery: SELECT 1
  96. # 多久检查一次连接的活性
  97. keepaliveTime: 30000
  98. --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  99. spring:
  100. redis:
  101. # 地址
  102. host: ${REDIS_HOST:localhost}
  103. # 端口,默认为6379
  104. port: ${REDIS_PORT:6379}
  105. # 数据库索引
  106. database: ${REDIS_DB:0}
  107. # 密码(如没有密码请注释掉)
  108. # password: ${REDIS_PWD:}
  109. # 连接超时时间
  110. timeout: 10s
  111. # 是否开启ssl
  112. ssl: false
  113. redisson:
  114. # redis key前缀
  115. keyPrefix:
  116. # 线程池数量
  117. threads: 4
  118. # Netty线程池数量
  119. nettyThreads: 8
  120. # 单节点配置
  121. singleServerConfig:
  122. # 客户端名称
  123. clientName: ${ruoyi.name}
  124. # 最小空闲连接数
  125. connectionMinimumIdleSize: 8
  126. # 连接池大小
  127. connectionPoolSize: 32
  128. # 连接空闲超时,单位:毫秒
  129. idleConnectionTimeout: 10000
  130. # 命令等待超时,单位:毫秒
  131. timeout: 3000
  132. # 发布和订阅连接池大小
  133. subscriptionConnectionPoolSize: 50
  134. --- # mail 邮件发送
  135. mail:
  136. enabled: false
  137. host: smtp.163.com
  138. port: 465
  139. # 是否需要用户名密码验证
  140. auth: true
  141. # 发送方,遵循RFC-822标准
  142. from: xxx@163.com
  143. # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  144. user: xxx@163.com
  145. # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  146. pass: xxxxxxxxxx
  147. # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  148. starttlsEnable: true
  149. # 使用SSL安全连接
  150. sslEnable: true
  151. # SMTP超时时长,单位毫秒,缺省值不超时
  152. timeout: 0
  153. # Socket连接超时值,单位毫秒,缺省值不超时
  154. connectionTimeout: 0
  155. --- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
  156. # https://wind.kim/doc/start 文档地址 各个厂商可同时使用
  157. sms:
  158. # 阿里云 dysmsapi.aliyuncs.com
  159. alibaba:
  160. #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
  161. requestUrl: dysmsapi.aliyuncs.com
  162. #阿里云的accessKey
  163. accessKeyId: xxxxxxx
  164. #阿里云的accessKeySecret
  165. accessKeySecret: xxxxxxx
  166. #短信签名
  167. signature: 测试
  168. tencent:
  169. #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
  170. requestUrl: sms.tencentcloudapi.com
  171. #腾讯云的accessKey
  172. accessKeyId: xxxxxxx
  173. #腾讯云的accessKeySecret
  174. accessKeySecret: xxxxxxx
  175. #短信签名
  176. signature: 测试
  177. #短信sdkAppId
  178. sdkAppId: appid
  179. #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
  180. territory: ap-guangzhou