feat(config): 简化 rui-service-starter Nacos 配置
- 只保留端口、服务名和 modules 配置 - 移除多余的 Spring Cloud 配置(已在本地 application.yml 中配置) 对应工单 #1
This commit is contained in:
@@ -1,76 +1,15 @@
|
|||||||
# ============================================================================
|
# rui-service-starter.yaml — 聚合启动器配置
|
||||||
# rui-service-starter.yaml — 聚合启动器 Nacos 配置
|
|
||||||
# Data ID: rui-service-starter.yaml
|
# Data ID: rui-service-starter.yaml
|
||||||
# Group: DEFAULT_GROUP
|
# Group: DEFAULT_GROUP
|
||||||
# 功能:聚合 system、user 等模块,统一启动部署
|
# 功能:聚合 system、user 等模块,统一启动部署
|
||||||
# ============================================================================
|
|
||||||
|
|
||||||
|
# 服务端口:9399(聚合启动器)
|
||||||
server:
|
server:
|
||||||
port: 9399 # 聚合启动器端口
|
port: 9399
|
||||||
shutdown: graceful # 优雅关闭
|
|
||||||
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: rui-service-starter # 服务名称
|
name: rui-service-starter
|
||||||
profiles:
|
|
||||||
active: @profiles.active@ # Maven 过滤,默认 dev
|
|
||||||
lifecycle:
|
|
||||||
timeout-per-shutdown-phase: 30s # 优雅关闭等待时间
|
|
||||||
autoconfigure:
|
|
||||||
exclude:
|
|
||||||
- com.alibaba.cloud.nacos.endpoint.NacosConfigEndpointAutoConfiguration
|
|
||||||
- com.alibaba.cloud.nacos.endpoint.NacosDiscoveryEndpointAutoConfiguration
|
|
||||||
servlet:
|
|
||||||
multipart:
|
|
||||||
max-file-size: 5MB
|
|
||||||
max-request-size: 10MB
|
|
||||||
encoding:
|
|
||||||
charset: UTF-8
|
|
||||||
enabled: true
|
|
||||||
force: true
|
|
||||||
cloud:
|
|
||||||
openfeign:
|
|
||||||
circuitbreaker:
|
|
||||||
enabled: true
|
|
||||||
nacos:
|
|
||||||
discovery: # 服务发现
|
|
||||||
server-addr: ${NACOS_SERVER_ADDR:nacos:8848}
|
|
||||||
namespace: ${NACOS_NAMESPACE:}
|
|
||||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
|
||||||
username: ${NACOS_USERNAME:nacos}
|
|
||||||
password: ${NACOS_PASSWORD:nacos}
|
|
||||||
config: # 配置中心
|
|
||||||
server-addr: ${NACOS_SERVER_ADDR:nacos:8848}
|
|
||||||
namespace: ${NACOS_NAMESPACE:}
|
|
||||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
|
||||||
username: ${NACOS_USERNAME:nacos}
|
|
||||||
password: ${NACOS_PASSWORD:nacos}
|
|
||||||
file-extension: yaml
|
|
||||||
import-check:
|
|
||||||
enabled: true
|
|
||||||
config:
|
|
||||||
import:
|
|
||||||
- optional:nacos:${spring.application.name}.${spring.cloud.nacos.config.file-extension:yaml}
|
|
||||||
- optional:nacos:rui-common.${spring.cloud.nacos.config.file-extension:yaml}
|
|
||||||
- optional:nacos:rui-data.${spring.cloud.nacos.config.file-extension:yaml}
|
|
||||||
|
|
||||||
# 聚合模式:本地 Feign 调用转发到自身,避免跨服务 HTTP 调用
|
|
||||||
feign:
|
|
||||||
client:
|
|
||||||
config:
|
|
||||||
userAuthFeign:
|
|
||||||
url: http://localhost:${server.port}
|
|
||||||
systemClientFeign:
|
|
||||||
url: http://localhost:${server.port}
|
|
||||||
|
|
||||||
# Resilience4j 线程池隔离配置:透传租户上下文
|
|
||||||
resilience4j:
|
|
||||||
thread-pool-bulkhead:
|
|
||||||
configs:
|
|
||||||
default:
|
|
||||||
contextPropagators:
|
|
||||||
- com.rui.common.feign.propagator.TenantContextPropagator
|
|
||||||
|
|
||||||
# 模块管理配置(供租户管理模块配置弹窗使用)
|
# 模块管理配置(供租户管理模块配置弹窗使用)
|
||||||
rui:
|
rui:
|
||||||
@@ -97,15 +36,3 @@ rui:
|
|||||||
icon: tabler:device-desktop
|
icon: tabler:device-desktop
|
||||||
# 默认启用模块(新租户默认开启,逗号分隔)
|
# 默认启用模块(新租户默认开启,逗号分隔)
|
||||||
default-enabled: system,user,demo
|
default-enabled: system,user,demo
|
||||||
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
exposure:
|
|
||||||
include: health
|
|
||||||
discovery:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
logging:
|
|
||||||
file:
|
|
||||||
path: logs/${spring.application.name}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user