application-dev.yaml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. server:
  2. port: 48080
  3. --- #################### 数据库相关配置 ####################
  4. spring:
  5. autoconfigure:
  6. exclude:
  7. - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
  8. datasource:
  9. druid: # Druid 【监控】相关的全局配置
  10. web-stat-filter:
  11. enabled: true
  12. stat-view-servlet:
  13. enabled: true
  14. allow: # 设置白名单,不填则允许所有访问
  15. url-pattern: /druid/*
  16. login-username: # 控制台管理用户名和密码
  17. login-password:
  18. filter:
  19. stat:
  20. enabled: true
  21. log-slow-sql: true # 慢 SQL 记录
  22. slow-sql-millis: 100
  23. merge-sql: true
  24. wall:
  25. config:
  26. multi-statement-allow: true
  27. dynamic: # 多数据源配置
  28. druid: # Druid 【连接池】相关的全局配置
  29. initial-size: 5 # 初始连接数
  30. min-idle: 10 # 最小连接池数量
  31. max-active: 20 # 最大连接池数量
  32. max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
  33. time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
  34. min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
  35. max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
  36. validation-query: SELECT 1 # 配置检测连接是否有效
  37. test-while-idle: true
  38. test-on-borrow: false
  39. test-on-return: false
  40. primary: master
  41. datasource:
  42. master:
  43. url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
  44. username: root
  45. password: 123456
  46. slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
  47. lazy: true # 开启懒加载,保证启动速度
  48. url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
  49. username: root
  50. password: 123456
  51. # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
  52. redis:
  53. host: 400-infra.server.iocoder.cn # 地址
  54. port: 6379 # 端口
  55. database: 1 # 数据库索引
  56. # password: 123456 # 密码,建议生产环境开启
  57. --- #################### 定时任务相关配置 ####################
  58. # Quartz 配置项,对应 QuartzProperties 配置类
  59. spring:
  60. quartz:
  61. auto-startup: true # 测试环境,需要开启 Job
  62. scheduler-name: schedulerName # Scheduler 名字。默认为 schedulerName
  63. job-store-type: jdbc # Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。
  64. wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true
  65. properties: # 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档
  66. org:
  67. quartz:
  68. # Scheduler 相关配置
  69. scheduler:
  70. instanceName: schedulerName
  71. instanceId: AUTO # 自动生成 instance ID
  72. # JobStore 相关配置
  73. jobStore:
  74. # JobStore 实现类。可见博客:https://blog.csdn.net/weixin_42458219/article/details/122247162
  75. class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
  76. isClustered: true # 是集群模式
  77. clusterCheckinInterval: 15000 # 集群检查频率,单位:毫秒。默认为 15000,即 15 秒
  78. misfireThreshold: 60000 # misfire 阀值,单位:毫秒。
  79. # 线程池相关配置
  80. threadPool:
  81. threadCount: 25 # 线程池大小。默认为 10 。
  82. threadPriority: 5 # 线程优先级
  83. class: org.quartz.simpl.SimpleThreadPool # 线程池类型
  84. jdbc: # 使用 JDBC 的 JobStore 的时候,JDBC 的配置
  85. initialize-schema: NEVER # 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ,我们手动创建表结构。
  86. --- #################### 消息队列相关 ####################
  87. # rocketmq 配置项,对应 RocketMQProperties 配置类
  88. rocketmq:
  89. name-server: 127.0.0.1:9876 # RocketMQ Namesrv
  90. spring:
  91. # RabbitMQ 配置项,对应 RabbitProperties 配置类
  92. rabbitmq:
  93. host: 127.0.0.1 # RabbitMQ 服务的地址
  94. port: 5672 # RabbitMQ 服务的端口
  95. username: guest # RabbitMQ 服务的账号
  96. password: guest # RabbitMQ 服务的密码
  97. # Kafka 配置项,对应 KafkaProperties 配置类
  98. kafka:
  99. bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
  100. --- #################### 服务保障相关配置 ####################
  101. # Lock4j 配置项
  102. lock4j:
  103. acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
  104. expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
  105. --- #################### 监控相关配置 ####################
  106. # Actuator 监控端点的配置项
  107. management:
  108. endpoints:
  109. web:
  110. base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
  111. exposure:
  112. include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
  113. # Spring Boot Admin 配置项
  114. spring:
  115. boot:
  116. admin:
  117. # Spring Boot Admin Client 客户端的相关配置
  118. client:
  119. url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
  120. instance:
  121. service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
  122. # Spring Boot Admin Server 服务端的相关配置
  123. context-path: /admin # 配置 Spring
  124. # 日志文件配置
  125. logging:
  126. file:
  127. name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
  128. --- #################### 微信公众号相关配置 ####################
  129. wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
  130. mp:
  131. # 公众号配置(必填)
  132. app-id: wx041349c6f39b268b
  133. secret: 5abee519483bc9f8cb37ce280e814bd0
  134. # 存储配置,解决 AccessToken 的跨节点的共享
  135. config-storage:
  136. type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
  137. key-prefix: wx # Redis Key 的前缀
  138. http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
  139. miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档
  140. appid: wx63c280fe3248a3e7
  141. secret: 6f270509224a7ae1296bbf1c8cb97aed
  142. config-storage:
  143. type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
  144. key-prefix: wa # Redis Key 的前缀
  145. http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
  146. --- #################### 芋道相关配置 ####################
  147. # 芋道配置项,设置当前项目所有自定义的配置
  148. yudao:
  149. pay:
  150. order-notify-url: http://yunai.natapp1.cc/ship-ota-api/pay/notify/order # 支付渠道的【支付】回调地址
  151. refund-notify-url: http://yunai.natapp1.cc/ship-ota-api/pay/notify/refund # 支付渠道的【退款】回调地址
  152. transfer-notify-url: https://yunai.natapp1.cc/ship-ota-api/pay/notify/transfer # 支付渠道的【转账】回调地址
  153. demo: false # 开启演示模式
  154. tencent-lbs-key: TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E # QQ 地图的密钥 https://lbs.qq.com/service/staticV2/staticGuide/staticDoc
  155. host: # 系统内外网访问host,用于处理服务器上不能访问当前域名的问题
  156. out: https://tms2.hbsxly.com/
  157. in: http://10.3.10.50:80/
  158. justauth:
  159. enabled: true
  160. type:
  161. DINGTALK: # 钉钉
  162. client-id: dingvrnreaje3yqvzhxg
  163. client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
  164. ignore-check-redirect-uri: true
  165. WECHAT_ENTERPRISE: # 企业微信
  166. client-id: wwd411c69a39ad2e54
  167. client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
  168. agent-id: 1000004
  169. ignore-check-redirect-uri: true
  170. # noinspection SpringBootApplicationYaml
  171. WECHAT_MINI_PROGRAM: # 微信小程序
  172. client-id: ${wx.miniapp.appid}
  173. client-secret: ${wx.miniapp.secret}
  174. ignore-check-redirect-uri: true
  175. ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
  176. WECHAT_MP: # 微信公众号
  177. client-id: ${wx.mp.app-id}
  178. client-secret: ${wx.mp.secret}
  179. ignore-check-redirect-uri: true
  180. cache:
  181. type: REDIS
  182. prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
  183. timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
  184. --- #################### iot相关配置 TODO 芋艿:再瞅瞅 ####################
  185. iot:
  186. emq:
  187. # 账号
  188. username: anhaohao
  189. # 密码
  190. password: ahh@123456
  191. # 主机地址
  192. hostUrl: tcp://chaojiniu.top:1883
  193. # 客户端Id,不能相同,采用随机数 ${random.value}
  194. client-id: ${random.int}
  195. # 默认主题
  196. default-topic: test
  197. # 保持连接
  198. keepalive: 60
  199. # 清除会话(设置为false,断开连接,重连后使用原来的会话 保留订阅的主题,能接收离线期间的消息)
  200. clearSession: true
  201. # 插件配置
  202. pf4j:
  203. pluginsDir: ${user.home}/plugins # 插件目录