格林威治春云酒店
spring-cloud-netflix-zuul
在维护模式下,所以我尝试从Zuul迁移到springcloudgateway。
zuul:
routes:
masterplan_match:
path: /**/masterplans/**
serviceId: api-masterplan
我在那里做的基本上是忽略了之前或之后发生的一切
masterplan
并重定向到
api-masterplan
. 例如,两者
/some/path/to/masterplans
/masterplans
转到相同的api(原因是
masterplans
是更大实体的子资源,负责创建新的
,但是
可以被视为完全成熟的资源
GET
我能把这个配置映射到SpringCloudGateway吗?看着
predicates
,似乎是可行的
path predicate
WildcardTheRestPathElement
,但它只能用作最后一个元素-我想),即:我需要写
spring
cloud:
gateway:
routes:
- id: masterplan_match
uri: lb://api-masterplan # Coming from discovery client
predicates:
- Path=/some/path/to/masterplans/**, /masterplans/**
我是不是错过了什么,这两条路能浓缩成一条?