application-test_old.yaml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. --- #################### 注册中心 + 配置中心相关配置 ####################
  2. spring:
  3. cloud:
  4. nacos:
  5. server-addr: 127.0.0.1:8848 # Nacos 服务器地址
  6. username: # Nacos 账号
  7. password: # Nacos 密码
  8. discovery: # 【配置中心】配置项
  9. namespace: dev # 命名空间。这里使用 dev 开发环境
  10. group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
  11. metadata:
  12. version: 1.0.0 # 服务实例的版本号,可用于灰度发布
  13. config: # 【注册中心】配置项
  14. namespace: dev # 命名空间。这里使用 dev 开发环境
  15. group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
  16. --- #################### 数据库相关配置 ####################
  17. spring:
  18. # 数据源配置项
  19. autoconfigure:
  20. exclude:
  21. datasource:
  22. druid: # Druid 【监控】相关的全局配置
  23. web-stat-filter:
  24. enabled: true
  25. stat-view-servlet:
  26. enabled: true
  27. allow: # 设置白名单,不填则允许所有访问
  28. url-pattern: /druid/*
  29. login-username: # 控制台管理用户名和密码
  30. login-password:
  31. filter:
  32. stat:
  33. enabled: true
  34. log-slow-sql: true # 慢 SQL 记录
  35. slow-sql-millis: 100
  36. merge-sql: true
  37. wall:
  38. config:
  39. multi-statement-allow: true
  40. dynamic: # 多数据源配置
  41. druid: # Druid 【连接池】相关的全局配置
  42. initial-size: 5 # 初始连接数
  43. min-idle: 10 # 最小连接池数量
  44. max-active: 20 # 最大连接池数量
  45. max-wait: 60000 # 配置获取连接等待超时的时间,单位:毫秒(1 分钟)
  46. time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒(1 分钟)
  47. min-evictable-idle-time-millis: 600000 # 配置一个连接在池中最小生存的时间,单位:毫秒(10 分钟)
  48. max-evictable-idle-time-millis: 1800000 # 配置一个连接在池中最大生存的时间,单位:毫秒(30 分钟)
  49. validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
  50. test-while-idle: true
  51. test-on-borrow: false
  52. test-on-return: false
  53. pool-prepared-statements: true # 是否开启 PreparedStatement 缓存
  54. max-pool-prepared-statement-per-connection-size: 20 # 每个连接缓存的 PreparedStatement 数量
  55. primary: master
  56. datasource:
  57. master:
  58. url: jdbc:mysql://127.0.0.1:3306/jt-business-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
  59. username: root
  60. password: 123456
  61. slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
  62. lazy: true # 开启懒加载,保证启动速度
  63. url: jdbc:mysql://127.0.0.1:3306/jt-business-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
  64. username: root
  65. password: 123456
  66. # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
  67. data:
  68. redis:
  69. host: 400-infra.server.iocoder.cn # 地址
  70. port: 6379 # 端口
  71. database: 1 # 数据库索引
  72. # password: 123456 # 密码,建议生产环境开启
  73. --- #################### MQ 消息队列相关配置 ####################
  74. # rocketmq 配置项,对应 RocketMQProperties 配置类
  75. rocketmq:
  76. name-server: 127.0.0.1:9876 # RocketMQ Namesrv
  77. spring:
  78. # RabbitMQ 配置项,对应 RabbitProperties 配置类
  79. rabbitmq:
  80. host: 127.0.0.1 # RabbitMQ 服务的地址
  81. port: 5672 # RabbitMQ 服务的端口
  82. username: guest # RabbitMQ 服务的账号
  83. password: guest # RabbitMQ 服务的密码
  84. # Kafka 配置项,对应 KafkaProperties 配置类
  85. kafka:
  86. bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
  87. --- #################### 定时任务相关配置 ####################
  88. xxl:
  89. job:
  90. admin:
  91. addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
  92. --- #################### 服务保障相关配置 ####################
  93. # Lock4j 配置项
  94. lock4j:
  95. acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
  96. expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
  97. --- #################### 监控相关配置 ####################
  98. # Actuator 监控端点的配置项
  99. management:
  100. endpoints:
  101. web:
  102. base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
  103. exposure:
  104. include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
  105. # Spring Boot Admin 配置项
  106. spring:
  107. boot:
  108. admin:
  109. # Spring Boot Admin Client 客户端的相关配置
  110. client:
  111. instance:
  112. service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
  113. # Spring Boot Admin Server 服务端的相关配置
  114. context-path: /admin # 配置 Spring
  115. # 日志文件配置
  116. logging:
  117. file:
  118. name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
  119. level:
  120. root: info
  121. --- #################### 微信公众号、小程序相关配置 ####################
  122. wx:
  123. mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
  124. # app-id: wx041349c6f39b268b
  125. # secret: 5abee519483bc9f8cb37ce280e814bd0
  126. app-id: wx5b23ba7a5589ecbb # 测试号
  127. secret: 2a7b3b20c537e52e74afd395eb85f61f
  128. # 存储配置,解决 AccessToken 的跨节点的共享
  129. config-storage:
  130. type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
  131. key-prefix: wx # Redis Key 的前缀
  132. http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
  133. miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档
  134. # appid: wx62056c0d5e8db250
  135. # secret: 333ae72f41552af1e998fe1f54e1584a
  136. appid: wx63c280fe3248a3e7 # wenhualian的接口测试号
  137. secret: 6f270509224a7ae1296bbf1c8cb97aed
  138. config-storage:
  139. type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
  140. key-prefix: wa # Redis Key 的前缀
  141. http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
  142. --- #################### jt相关配置 ####################
  143. # jt配置项,设置当前项目所有自定义的配置
  144. jt:
  145. demo: true # 开启演示模式
  146. justauth:
  147. enabled: true
  148. type:
  149. DINGTALK: # 钉钉
  150. client-id: dingvrnreaje3yqvzhxg
  151. client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
  152. ignore-check-redirect-uri: true
  153. WECHAT_ENTERPRISE: # 企业微信
  154. client-id: wwd411c69a39ad2e54
  155. client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
  156. agent-id: 1000004
  157. ignore-check-redirect-uri: true
  158. # noinspection SpringBootApplicationYaml
  159. WECHAT_MINI_PROGRAM: # 微信小程序
  160. client-id: ${wx.miniapp.appid}
  161. client-secret: ${wx.miniapp.secret}
  162. ignore-check-redirect-uri: true
  163. ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
  164. WECHAT_MP: # 微信公众号
  165. client-id: ${wx.mp.app-id}
  166. client-secret: ${wx.mp.secret}
  167. ignore-check-redirect-uri: true
  168. cache:
  169. type: REDIS
  170. prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
  171. timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟