【代码优化】SYSTEM:移除 bootstrap.yaml,和 boot 保持一致

This commit is contained in:
YunaiV
2024-07-14 17:47:44 +08:00
parent 41a16b2651
commit 4ae3ac0f6d
11 changed files with 90 additions and 91 deletions

View File

@@ -1,7 +1,18 @@
spring:
application:
name: gateway-server
profiles:
active: local
main:
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
config:
import:
- optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
cloud:
# Spring Cloud Gateway 配置项,对应 GatewayProperties 类
gateway:
@@ -162,6 +173,13 @@ spring:
x-forwarded:
prefix-enabled: false # 避免 Swagger 重复带上额外的 /admin-api/system 前缀
server:
port: 48080
logging:
file:
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
knife4j:
# 聚合 Swagger 文档,参考 https://doc.xiaominfo.com/docs/action/springcloud-gateway 文档
gateway: