Files
rui-docs/backend/config-templates/nacos/rui-gateway.yaml
T
vifo 19de7e24ec docs: 迁移 spring-ai 通用文档到 rui-docs
从 docs-local 迁移以下文档:

- backend/guides/: AI开发环境配置、Nacos配置、GitNexus指南、OpenCode工作流等

- backend/templates/: Superpowers设计模板、计划模板、审查清单

- backend/config-templates/: 应用配置模板、Nacos配置

- backend/design/: 数据库表结构规划

- backend/specs/: 项目文档治理、MQ统一推送设计

- backend/: 代码分析报告、Feign分析报告、文档治理报告

- frontend/design/: Admin-UI分模块打包设计
2026-06-04 09:34:03 +08:00

81 lines
2.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# rui-gateway.yaml — 网关路由配置 (Gateway 5.x 格式:server.webflux.routes)
# 说明:默认使用聚合模式(所有业务路由指向 rui-service-starter
# 如需独立微服务模式,取消注释独立路由并注释掉聚合路由
spring:
cloud:
gateway:
server:
webflux:
routes:
- id: rui-auth
uri: lb://rui-auth
predicates:
- Path=/auth/**
filters:
- StripPrefix=0
- id: rui-auth
uri: lb://rui-auth
predicates:
- Path=/oauth2/**
filters:
- StripPrefix=0
- id: rui-service-pay
uri: lb://rui-service-pay
predicates:
- Path=/payment/**
filters:
- StripPrefix=0
# ========== 聚合模式(默认,中小型项目)==========
- id: rui-service-starter
uri: lb://rui-service-starter
predicates:
- Path=/user/**,/system/**
filters:
- StripPrefix=0
- id: rui-cashier
uri: lb://rui-cashier-api
predicates:
- Path=/cashier/**
filters:
- StripPrefix=0
# ========== 独立微服务模式(大型项目)==========
# - id: rui-service-user
# uri: lb://rui-service-user
# predicates:
# - Path=/user/**
# filters:
# - StripPrefix=0
# - id: rui-service-system
# uri: lb://rui-service-system
# predicates:
# - Path=/system/**
# filters:
# - StripPrefix=0
# 灰度发布配置
# 支持按服务配置不同的灰度策略,包括:权重、用户白名单、IP 白名单、强制 Header
grayscale:
# 强制灰度 Header 名称,客户端通过此 Header 强制指定版本
force-header: X-Grayscale-Version
# 灰度规则(Key 为服务名,如 rui-service-user
# 配置示例:
# rules:
# rui-service-user:
# enabled: true
# version: v2
# weight: 10
# user-ids:
# - user001
# ip-ranges:
# - 192.168.1.0/24
management:
endpoints:
web:
exposure:
include: health # 仅暴露 health 端点,其余全部禁止访问
# 服务端口:9300(网关最优先)
server:
port: 9300