|
@@ -3,6 +3,7 @@ spring:
|
|
|
# 数据源配置项
|
|
|
autoconfigure:
|
|
|
exclude:
|
|
|
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
|
|
|
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
|
|
|
datasource:
|
|
|
druid: # Druid 【监控】相关的全局配置
|
|
@@ -39,38 +40,52 @@ spring:
|
|
|
primary: master
|
|
|
datasource:
|
|
|
master:
|
|
|
- name: ruoyi-vue-pro
|
|
|
- url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
|
-# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例
|
|
|
-# url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.master.name} # PostgreSQL 连接的示例
|
|
|
-# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
|
-# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例
|
|
|
+ name: citu
|
|
|
+ url: jdbc:mysql://192.168.3.80:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
|
+ # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例
|
|
|
+ # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.master.name} # PostgreSQL 连接的示例
|
|
|
+ # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
|
+ # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例
|
|
|
username: root
|
|
|
password: 123456
|
|
|
-# username: sa
|
|
|
-# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W
|
|
|
+ # username: sa
|
|
|
+ # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W
|
|
|
slave: # 模拟从库,可根据自己需要修改
|
|
|
- name: ruoyi-vue-pro
|
|
|
- url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
|
-# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例
|
|
|
-# url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例
|
|
|
-# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
|
-# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例
|
|
|
+ name: citu
|
|
|
+ url: jdbc:mysql://192.168.3.80:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
|
|
+ # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例
|
|
|
+ # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例
|
|
|
+ # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
|
|
+ # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例
|
|
|
username: root
|
|
|
password: 123456
|
|
|
-# username: sa
|
|
|
-# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W
|
|
|
+ # username: sa
|
|
|
+ # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W
|
|
|
|
|
|
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
|
|
- data:
|
|
|
- redis:
|
|
|
- host: 127.0.0.1 # 地址
|
|
|
- port: 6379 # 端口
|
|
|
- database: 0 # 数据库索引
|
|
|
-# password: 123456 # 密码,建议生产环境开启
|
|
|
+ redis:
|
|
|
+ host: 192.168.3.80 # 地址
|
|
|
+ port: 6379 # 端口
|
|
|
+ database: 0 # 数据库索引
|
|
|
+# password: 123456 # 密码,建议生产环境开启
|
|
|
|
|
|
--- #################### MQ 消息队列相关配置 ####################
|
|
|
|
|
|
+# rocketmq 配置项,对应 RocketMQProperties 配置类
|
|
|
+rocketmq:
|
|
|
+ name-server: 127.0.0.1:9876 # RocketMQ Namesrv
|
|
|
+
|
|
|
+spring:
|
|
|
+ # RabbitMQ 配置项,对应 RabbitProperties 配置类
|
|
|
+ rabbitmq:
|
|
|
+ host: 127.0.0.1 # RabbitMQ 服务的地址
|
|
|
+ port: 5672 # RabbitMQ 服务的端口
|
|
|
+ username: guest # RabbitMQ 服务的账号
|
|
|
+ password: guest # RabbitMQ 服务的密码
|
|
|
+ # Kafka 配置项,对应 KafkaProperties 配置类
|
|
|
+ kafka:
|
|
|
+ bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
|
|
|
+
|
|
|
--- #################### 定时任务相关配置 ####################
|
|
|
|
|
|
xxl:
|
|
@@ -113,19 +128,78 @@ logging:
|
|
|
com.citu.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
|
|
|
com.citu.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
|
|
|
|
|
|
+--- #################### 微信公众号、小程序相关配置 ####################
|
|
|
+wx:
|
|
|
+ mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
|
|
|
+ # app-id: wx041349c6f39b268b # 测试号(牛希尧提供的)
|
|
|
+ # secret: 5abee519483bc9f8cb37ce280e814bd0
|
|
|
+ app-id: wx5b23ba7a5589ecbb # 测试号(自己的)
|
|
|
+ secret: 2a7b3b20c537e52e74afd395eb85f61f
|
|
|
+ # app-id: wxa69ab825b163be19 # 测试号(Kongdy 提供的)
|
|
|
+ # secret: bd4f9fab889591b62aeac0d7b8d8b4a0
|
|
|
+ # 存储配置,解决 AccessToken 的跨节点的共享
|
|
|
+ config-storage:
|
|
|
+ type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
|
|
|
+ key-prefix: wx # Redis Key 的前缀
|
|
|
+ http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
|
|
+ miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档
|
|
|
+ # appid: wx62056c0d5e8db250 # 测试号(牛希尧提供的)
|
|
|
+ # secret: 333ae72f41552af1e998fe1f54e1584a
|
|
|
+ appid: wx63c280fe3248a3e7 # wenhualian的接口测试号
|
|
|
+ secret: 6f270509224a7ae1296bbf1c8cb97aed
|
|
|
+ # appid: wxc4598c446f8a9cb3 # 测试号(Kongdy 提供的)
|
|
|
+ # secret: 4a1a04e07f6a4a0751b39c3064a92c8b
|
|
|
+ config-storage:
|
|
|
+ type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
|
|
|
+ key-prefix: wa # Redis Key 的前缀
|
|
|
+ http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
|
|
+
|
|
|
--- #################### 芋道相关配置 ####################
|
|
|
|
|
|
# 芋道配置项,设置当前项目所有自定义的配置
|
|
|
citu:
|
|
|
env: # 多环境的配置项
|
|
|
tag: ${HOSTNAME}
|
|
|
- web:
|
|
|
- admin-ui:
|
|
|
- url: http://dashboard.citu.iocoder.cn # Admin 管理后台 UI 的地址
|
|
|
+ captcha:
|
|
|
+ enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试
|
|
|
security:
|
|
|
mock-enable: true
|
|
|
xss:
|
|
|
enable: false
|
|
|
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
|
|
|
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
|
|
|
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
|
|
+ pay:
|
|
|
+ pay-notify-url: http://niubi.natapp1.cc/api/pay/order/notify
|
|
|
+ pay-return-url: http://niubi.natapp1.cc/api/pay/order/return
|
|
|
+ refund-notify-url: http://niubi.natapp1.cc/api/pay/refund/notify
|
|
|
access-log: # 访问日志的配置项
|
|
|
enable: false
|
|
|
demo: false # 关闭演示模式
|
|
|
+
|
|
|
+justauth:
|
|
|
+ enabled: true
|
|
|
+ type:
|
|
|
+ DINGTALK: # 钉钉
|
|
|
+ client-id: dingvrnreaje3yqvzhxg
|
|
|
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
|
|
|
+ ignore-check-redirect-uri: true
|
|
|
+ WECHAT_ENTERPRISE: # 企业微信
|
|
|
+ client-id: wwd411c69a39ad2e54
|
|
|
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
|
|
|
+ agent-id: 1000004
|
|
|
+ ignore-check-redirect-uri: true
|
|
|
+ # noinspection SpringBootApplicationYaml
|
|
|
+ WECHAT_MINI_APP: # 微信小程序
|
|
|
+ client-id: ${wx.miniapp.appid}
|
|
|
+ client-secret: ${wx.miniapp.secret}
|
|
|
+ ignore-check-redirect-uri: true
|
|
|
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
|
|
|
+ WECHAT_MP: # 微信公众号
|
|
|
+ client-id: ${wx.mp.app-id}
|
|
|
+ client-secret: ${wx.mp.secret}
|
|
|
+ ignore-check-redirect-uri: true
|
|
|
+ cache:
|
|
|
+ type: REDIS
|
|
|
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
|
|
|
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
|