跳到主要内容
版本:5.0.1

PrefixPath GatewayFilter 工厂

DeepSeek V3 中英对照 PrefixPath GatewayFilter Factory PrefixPath GatewayFilter Factory

PrefixPath GatewayFilter 工厂接收一个 prefix 参数。以下示例配置了一个 PrefixPath GatewayFilter:

spring:
cloud:
gateway:
routes:
- id: prefixpath_route
uri: https://example.org
filters:
- PrefixPath=/mypath

这将为所有匹配请求的路径添加前缀 /mypath。因此,对 /hello 的请求将被发送到 /mypath/hello。