40 lines
1.8 KiB
YAML
40 lines
1.8 KiB
YAML
spring:
|
|
main:
|
|
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
|
|
|
cloud:
|
|
# Spring Cloud Gateway 配置项,对应 GatewayProperties 类
|
|
gateway:
|
|
# 路由配置项,对应 RouteDefinition 数组
|
|
routes:
|
|
- id: system-admin-api # 路由的编号
|
|
uri: grayLb://system-server
|
|
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
- Path=/admin-api/system/**
|
|
filters:
|
|
- RewritePath=/admin-api/system/v2/api-docs, /v2/api-docs # 配置,保证转发到 /v2/api-docs
|
|
- id: system-app-api # 路由的编号
|
|
uri: grayLb://system-server
|
|
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
- Path=/app-api/system/**
|
|
filters:
|
|
- RewritePath=/app-api/system/v2/api-docs, /v2/api-docs
|
|
- id: infra-admin-api # 路由的编号
|
|
uri: grayLb://infra-server
|
|
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
- Path=/admin-api/infra/**
|
|
filters:
|
|
- RewritePath=/admin-api/infra/v2/api-docs, /v2/api-docs
|
|
- id: infra-app-api # 路由的编号
|
|
uri: grayLb://infra-server
|
|
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
- Path=/app-api/infra/**
|
|
filters:
|
|
- RewritePath=/app-api/infra/v2/api-docs, /v2/api-docs
|
|
- id: bpm-admin-api # 路由的编号
|
|
uri: grayLb://bpm-server
|
|
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
|
- Path=/admin-api/bpm/**
|
|
filters:
|
|
- RewritePath=/admin-api/bpm/v2/api-docs, /v2/api-docs
|