2025-03-21 14:56:15 +08:00
|
|
|
|
# Tomcat
|
|
|
|
|
server:
|
|
|
|
|
port: 8085
|
|
|
|
|
|
|
|
|
|
# Spring
|
|
|
|
|
spring:
|
|
|
|
|
application:
|
|
|
|
|
# 应用名称
|
2025-08-08 16:22:31 +08:00
|
|
|
|
name: bd-third
|
2025-03-21 14:56:15 +08:00
|
|
|
|
jackson:
|
|
|
|
|
# 返回数据序列化时,如果为 null 则不进行返回
|
|
|
|
|
default-property-inclusion: NON_NULL
|
|
|
|
|
profiles:
|
|
|
|
|
# 环境配置
|
|
|
|
|
active: dev
|
|
|
|
|
cloud:
|
|
|
|
|
nacos:
|
|
|
|
|
discovery:
|
|
|
|
|
# 服务注册地址
|
2025-08-08 16:22:31 +08:00
|
|
|
|
server-addr: @config.server-addr@
|
|
|
|
|
username: @config.username@
|
|
|
|
|
password: @config.password@
|
2025-08-08 17:43:54 +08:00
|
|
|
|
namespace: @config.namespace@
|
2025-03-21 14:56:15 +08:00
|
|
|
|
config:
|
|
|
|
|
# 配置中心地址
|
2025-08-08 16:22:31 +08:00
|
|
|
|
server-addr: @config.server-addr@
|
|
|
|
|
username: @config.username@
|
|
|
|
|
password: @config.password@
|
2025-08-08 17:43:54 +08:00
|
|
|
|
namespace: @config.namespace@
|
2025-03-21 14:56:15 +08:00
|
|
|
|
# 配置文件格式
|
|
|
|
|
file-extension: yml
|
|
|
|
|
# 共享配置
|
|
|
|
|
shared-configs:
|
|
|
|
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
2025-08-08 16:22:31 +08:00
|
|
|
|
## 业务模块依赖的公用配置(缓存、数据库、事务、mybatis-plus)
|
|
|
|
|
- business-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
|
|
|
|
## 三方自定义配置
|
|
|
|
|
- business-third.${spring.cloud.nacos.config.file-extension}
|
2025-03-21 14:56:15 +08:00
|
|
|
|
main:
|
|
|
|
|
## 当遇到同样名字的时候,是否允许覆盖注册
|
|
|
|
|
allow-bean-definition-overriding: true
|
|
|
|
|
## true 表示控制台不会打印循环依赖异常
|
|
|
|
|
allow-circular-references: true
|
|
|
|
|
# 邮件配置
|
|
|
|
|
mail:
|
|
|
|
|
host: smtp.office365.com # 配置 smtp 服务器地址
|
|
|
|
|
port: 587 # smtp 服务器的端口
|
|
|
|
|
username: welcome_xhzs@outlook.com # 配置邮箱用户名(你的邮箱地址)
|
|
|
|
|
password: ffjeiitbxhadgvrj # 配置申请到的授权码
|
|
|
|
|
default-encoding: UTF-8 # 配置邮件编码
|
|
|
|
|
properties:
|
|
|
|
|
mail:
|
|
|
|
|
smtp:
|
|
|
|
|
auth: true
|
|
|
|
|
ssl:
|
|
|
|
|
socketFactory:
|
|
|
|
|
class: com.sun.mail.util.MailSSLSocketFactory
|
|
|
|
|
fallback: false
|
|
|
|
|
starttls:
|
|
|
|
|
enable: true
|
|
|
|
|
socketFactoryClass: javax.net.ssl.SSLSocketFactory # 配饰 SSL 加密工厂
|
|
|
|
|
debug: true
|
|
|
|
|
from: welcome_xhzs@outlook.com # 发送方邮件,陪在yml中可方便更改
|
|
|
|
|
|
|
|
|
|
dubbo:
|
|
|
|
|
registry:
|
|
|
|
|
## 使用spring-cloud注册配置
|
|
|
|
|
address: spring-cloud://localhost
|
|
|
|
|
consumer:
|
|
|
|
|
# 远程服务调用超时时间(毫秒)
|
|
|
|
|
timeout: 10000
|
|
|
|
|
## 启动时不检查服务提供者是否存在
|
|
|
|
|
check: false
|
|
|
|
|
# 重试次数(默认:2)
|
|
|
|
|
retries: 0
|
|
|
|
|
## 负载策略(最少活跃调用)
|
|
|
|
|
loadbalance: "leastactive"
|
|
|
|
|
protocol:
|
|
|
|
|
## 设置协议为dubbo
|
|
|
|
|
name: dubbo
|
|
|
|
|
## dubbo 协议端口 (-1 表示自增端口,从20880开始)
|
|
|
|
|
port: -1
|
|
|
|
|
cloud:
|
|
|
|
|
## 订阅服务
|
2025-08-08 17:58:36 +08:00
|
|
|
|
subscribed-services: bd-third, bd-system, bd-member, bd-sale, bd-bonus, bd-scm
|
2025-03-21 14:56:15 +08:00
|
|
|
|
scan:
|
|
|
|
|
# dubbo 服务扫描包(开启之后才会对外提供服务)
|
|
|
|
|
base-packages: com.hzs.third
|
|
|
|
|
|
|
|
|
|
#################### 三方对接相关信息 ####################
|
|
|
|
|
|
|
|
|
|
## 邮件配置
|
|
|
|
|
mall:
|
|
|
|
|
## 邮件发送方
|
|
|
|
|
from: welcome_xhzs@outlook.com
|
|
|
|
|
|
|
|
|
|
## 百度翻译配置(http://fanyi-api.baidu.com/api/trans/product/desktop?req=detail)
|
|
|
|
|
baidu:
|
|
|
|
|
translate:
|
|
|
|
|
## API appId
|
|
|
|
|
appId: 20220908001335830
|
|
|
|
|
## API secretKey
|
|
|
|
|
secretKey: QNTduiavyyL4Zb0Aj43Z
|
|
|
|
|
url: https://fanyi-api.baidu.com/api/trans/vip/translate
|
|
|
|
|
|
|
|
|
|
# 日志配置
|
|
|
|
|
logging:
|
|
|
|
|
level:
|
|
|
|
|
com.hzs: debug
|
|
|
|
|
org.springframework: warn
|
|
|
|
|
|
|
|
|
|
## AWS配置
|
|
|
|
|
aws:
|
|
|
|
|
accessKey: AKIARHJJNF26Z6XSO5R3
|
|
|
|
|
secretKey: 6X2yXiKnMuqhq7WankIfelZgCDqybcxEQbmPeo9t
|
|
|
|
|
bucketName: agl413-test
|
|
|
|
|
## 目录前缀
|
|
|
|
|
prefixDirectory: test
|
|
|
|
|
## 测试访问路径
|
|
|
|
|
filePath: https://agl413-test.s3.af-south-1.amazonaws.com/
|
|
|
|
|
## 非洲
|
|
|
|
|
region: af-south-1
|