application-prod.yml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. --- # 临时文件存储位置 避免临时文件被系统清理报错
  2. spring.servlet.multipart.location: /ruoyi/server/temp
  3. --- # 监控中心配置
  4. spring.boot.admin.client:
  5. # 增加客户端开关
  6. enabled: true
  7. url: http://localhost:9090/admin
  8. instance:
  9. service-host-type: IP
  10. username: ruoyi
  11. password: 123456
  12. --- # powerjob 配置
  13. powerjob:
  14. worker:
  15. # 如何开启调度中心请查看文档教程
  16. enabled: false
  17. # 需要先在 powerjob 登录页执行应用注册后才能使用
  18. app-name: ruoyi-worker
  19. allow-lazy-connect-server: false
  20. max-appended-wf-context-length: 4096
  21. max-result-length: 4096
  22. # 28080 端口 随着主应用端口飘逸 避免集群冲突
  23. port: 2${server.port}
  24. protocol: http
  25. server-address: 127.0.0.1:7700
  26. store-strategy: disk
  27. --- # easy-retry 配置
  28. easy-retry:
  29. enabled: false
  30. # 需要在EasyRetry后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务
  31. group-name: "ruoyi_group"
  32. server:
  33. host: 127.0.0.1
  34. port: 1788
  35. # 详见 script/sql/easy_retry.sql `namespace` 表
  36. namespace: ${spring.profiles.active}
  37. --- # 数据源配置
  38. spring:
  39. datasource:
  40. type: com.zaxxer.hikari.HikariDataSource
  41. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  42. dynamic:
  43. # 性能分析插件(有性能损耗 不建议生产环境使用)
  44. p6spy: false
  45. # 设置默认的数据源或者数据源组,默认值即为 master
  46. primary: master
  47. # 严格模式 匹配不到数据源则报错
  48. strict: true
  49. datasource:
  50. # 主库数据源
  51. master:
  52. type: ${spring.datasource.type}
  53. driverClassName: com.mysql.cj.jdbc.Driver
  54. # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  55. # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  56. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
  57. username: root
  58. password: root
  59. # 从库数据源
  60. slave:
  61. lazy: true
  62. type: ${spring.datasource.type}
  63. driverClassName: com.mysql.cj.jdbc.Driver
  64. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
  65. username:
  66. password:
  67. # oracle:
  68. # type: ${spring.datasource.type}
  69. # driverClassName: oracle.jdbc.OracleDriver
  70. # url: jdbc:oracle:thin:@//localhost:1521/XE
  71. # username: ROOT
  72. # password: root
  73. # postgres:
  74. # type: ${spring.datasource.type}
  75. # driverClassName: org.postgresql.Driver
  76. # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  77. # username: root
  78. # password: root
  79. # sqlserver:
  80. # type: ${spring.datasource.type}
  81. # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
  82. # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
  83. # username: SA
  84. # password: root
  85. hikari:
  86. # 最大连接池数量
  87. maxPoolSize: 20
  88. # 最小空闲线程数量
  89. minIdle: 10
  90. # 配置获取连接等待超时的时间
  91. connectionTimeout: 30000
  92. # 校验超时时间
  93. validationTimeout: 5000
  94. # 空闲连接存活最大时间,默认10分钟
  95. idleTimeout: 600000
  96. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  97. maxLifetime: 1800000
  98. # 多久检查一次连接的活性
  99. keepaliveTime: 30000
  100. --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  101. spring.data:
  102. redis:
  103. # 地址
  104. host: localhost
  105. # 端口,默认为6379
  106. port: 6379
  107. # 数据库索引
  108. database: 0
  109. # 密码(如没有密码请注释掉)
  110. # password:
  111. # 连接超时时间
  112. timeout: 10s
  113. # 是否开启ssl
  114. ssl.enabled: false
  115. redisson:
  116. # redis key前缀
  117. keyPrefix:
  118. # 线程池数量
  119. threads: 16
  120. # Netty线程池数量
  121. nettyThreads: 32
  122. # 单节点配置
  123. singleServerConfig:
  124. # 客户端名称
  125. clientName: ${ruoyi.name}
  126. # 最小空闲连接数
  127. connectionMinimumIdleSize: 32
  128. # 连接池大小
  129. connectionPoolSize: 64
  130. # 连接空闲超时,单位:毫秒
  131. idleConnectionTimeout: 10000
  132. # 命令等待超时,单位:毫秒
  133. timeout: 3000
  134. # 发布和订阅连接池大小
  135. subscriptionConnectionPoolSize: 50
  136. --- # mail 邮件发送
  137. mail:
  138. enabled: false
  139. host: smtp.163.com
  140. port: 465
  141. # 是否需要用户名密码验证
  142. auth: true
  143. # 发送方,遵循RFC-822标准
  144. from: xxx@163.com
  145. # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  146. user: xxx@163.com
  147. # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  148. pass: xxxxxxxxxx
  149. # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  150. starttlsEnable: true
  151. # 使用SSL安全连接
  152. sslEnable: true
  153. # SMTP超时时长,单位毫秒,缺省值不超时
  154. timeout: 0
  155. # Socket连接超时值,单位毫秒,缺省值不超时
  156. connectionTimeout: 0
  157. --- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
  158. # https://sms4j.com/doc3/ 差异配置文档地址 支持单厂商多配置,可以配置多个同时使用
  159. sms:
  160. # 配置源类型用于标定配置来源(interface,yaml)
  161. config-type: yaml
  162. # 用于标定yml中的配置是否开启短信拦截,接口配置不受此限制
  163. restricted: true
  164. # 短信拦截限制单手机号每分钟最大发送,只对开启了拦截的配置有效
  165. minute-max: 1
  166. # 短信拦截限制单手机号每日最大发送量,只对开启了拦截的配置有效
  167. account-max: 30
  168. # 以下配置来自于 org.dromara.sms4j.provider.config.BaseConfig类中
  169. blends:
  170. # 唯一ID 用于发送短信寻找具体配置 随便定义别用中文即可
  171. # 可以同时存在两个相同厂商 例如: ali1 ali2 两个不同的阿里短信账号 也可用于区分租户
  172. config1:
  173. # 框架定义的厂商名称标识,标定此配置是哪个厂商,详细请看厂商标识介绍部分
  174. supplier: alibaba
  175. # 有些称为accessKey有些称之为apiKey,也有称为sdkKey或者appId。
  176. access-key-id: 您的accessKey
  177. # 称为accessSecret有些称之为apiSecret
  178. access-key-secret: 您的accessKeySecret
  179. signature: 您的短信签名
  180. sdk-app-id: 您的sdkAppId
  181. config2:
  182. # 厂商标识,标定此配置是哪个厂商,详细请看厂商标识介绍部分
  183. supplier: tencent
  184. access-key-id: 您的accessKey
  185. access-key-secret: 您的accessKeySecret
  186. signature: 您的短信签名
  187. sdk-app-id: 您的sdkAppId
  188. --- # 三方授权
  189. justauth:
  190. # 前端外网访问地址
  191. address: http://localhost:80
  192. type:
  193. maxkey:
  194. # maxkey 服务器地址
  195. # 注意 如下均配置均不需要修改 maxkey 已经内置好了数据
  196. server-url: http://sso.maxkey.top
  197. client-id: 876892492581044224
  198. client-secret: x1Y5MTMwNzIwMjMxNTM4NDc3Mzche8
  199. redirect-uri: ${justauth.address}/social-callback?source=maxkey
  200. topiam:
  201. # topiam 服务器地址
  202. server-url: http://127.0.0.1:1989/api/v1/authorize/y0q************spq***********8ol
  203. client-id: 449c4*********937************759
  204. client-secret: ac7***********1e0************28d
  205. redirect-uri: ${justauth.address}/social-callback?source=topiam
  206. scopes: [ openid, email, phone, profile ]
  207. qq:
  208. client-id: 10**********6
  209. client-secret: 1f7d08**********5b7**********29e
  210. redirect-uri: ${justauth.address}/social-callback?source=qq
  211. union-id: false
  212. weibo:
  213. client-id: 10**********6
  214. client-secret: 1f7d08**********5b7**********29e
  215. redirect-uri: ${justauth.address}/social-callback?source=weibo
  216. gitee:
  217. client-id: 91436b7940090d09c72c7daf85b959cfd5f215d67eea73acbf61b6b590751a98
  218. client-secret: 02c6fcfd70342980cd8dd2f2c06c1a350645d76c754d7a264c4e125f9ba915ac
  219. redirect-uri: ${justauth.address}/social-callback?source=gitee
  220. dingtalk:
  221. client-id: 10**********6
  222. client-secret: 1f7d08**********5b7**********29e
  223. redirect-uri: ${justauth.address}/social-callback?source=dingtalk
  224. baidu:
  225. client-id: 10**********6
  226. client-secret: 1f7d08**********5b7**********29e
  227. redirect-uri: ${justauth.address}/social-callback?source=baidu
  228. csdn:
  229. client-id: 10**********6
  230. client-secret: 1f7d08**********5b7**********29e
  231. redirect-uri: ${justauth.address}/social-callback?source=csdn
  232. coding:
  233. client-id: 10**********6
  234. client-secret: 1f7d08**********5b7**********29e
  235. redirect-uri: ${justauth.address}/social-callback?source=coding
  236. coding-group-name: xx
  237. oschina:
  238. client-id: 10**********6
  239. client-secret: 1f7d08**********5b7**********29e
  240. redirect-uri: ${justauth.address}/social-callback?source=oschina
  241. alipay_wallet:
  242. client-id: 10**********6
  243. client-secret: 1f7d08**********5b7**********29e
  244. redirect-uri: ${justauth.address}/social-callback?source=alipay_wallet
  245. alipay-public-key: MIIB**************DAQAB
  246. wechat_open:
  247. client-id: 10**********6
  248. client-secret: 1f7d08**********5b7**********29e
  249. redirect-uri: ${justauth.address}/social-callback?source=wechat_open
  250. wechat_mp:
  251. client-id: 10**********6
  252. client-secret: 1f7d08**********5b7**********29e
  253. redirect-uri: ${justauth.address}/social-callback?source=wechat_mp
  254. wechat_enterprise:
  255. client-id: 10**********6
  256. client-secret: 1f7d08**********5b7**********29e
  257. redirect-uri: ${justauth.address}/social-callback?source=wechat_enterprise
  258. agent-id: 1000002
  259. gitlab:
  260. client-id: 10**********6
  261. client-secret: 1f7d08**********5b7**********29e
  262. redirect-uri: ${justauth.address}/social-callback?source=gitlab