1、依赖升级:springboot 2.7.18 -> 3.4.5,springcloud 2021.x -> 2024.x ,其余包同步yudao升级;2、微服务配置简化;

This commit is contained in:
gaoqr
2025-07-22 11:39:54 +08:00
parent 799affcecb
commit 20085ffb9f
915 changed files with 3116 additions and 4561 deletions
+25 -8
View File
@@ -1,10 +1,21 @@
spring:
application:
name: gateway-server
profiles:
active: local
main:
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
codec:
# getway请求大小限制10M1024 * 1024 * 10
max-in-memory-size: 10485760
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:
@@ -79,6 +90,19 @@ spring:
x-forwarded:
prefix-enabled: false # 避免 Swagger 重复带上额外的 /admin-api/system 前缀
server:
port: 48080
# 开启Gzip压缩,默认只压缩超过2048字节的数据
compression:
enabled: true
min-response-size: 2048
mime-types: application/json
# 日志文件配置。注意,如果 logging.file.name 不放在 bootstrap.yaml 配置文件,而是放在 application.yaml 中,会导致出现 LOG_FILE_IS_UNDEFINED 文件
logging:
file:
name: ${user.home}/logs/${spring.application.name} # 日志文件名,全路径
knife4j:
# 聚合 Swagger 文档,参考 https://doc.xiaominfo.com/docs/action/springcloud-gateway 文档
gateway:
@@ -101,11 +125,4 @@ knife4j:
url: /admin-api/plan/v3/api-docs
- name: report-server
service-name: report-server
url: /admin-api/report/v3/api-docs
chenfeng:
gateway:
accessLogEnable: false
access-log-ignore-urls:
- /report/template
- /system/captcha/get
url: /admin-api/report/v3/api-docs