Skip to content

Commit bd8c3cc

Browse files
committed
docs: explain spring.webflux.base-path influence on Path Route Predicate
Signed-off-by: 郭付一男 <[email protected]>
1 parent cd46e48 commit bd8c3cc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/modules/ROOT/pages/spring-cloud-gateway/request-predicates-factories.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ This route matches if the request path was, for example: `/red/1` or `/red/1/` o
192192

193193
If `matchTrailingSlash` is set to `false`, then request path `/red/1/` will not be matched.
194194

195+
If you have set `spring.webflux.base-path` property, this will influence the path matching. The property value will be automatically prepended to the path patterns. For example, with `spring.webflux.base-path=/app` and a path pattern of `/red/{segment}`, the full pattern used for matching would be `/app/red/{segment}`.
196+
195197
This predicate extracts the URI template variables (such as `segment`, defined in the preceding example) as a map of names and values and places it in the `ServerWebExchange.getAttributes()` with a key defined in `ServerWebExchangeUtils.URI_TEMPLATE_VARIABLES_ATTRIBUTE`.
196198
Those values are then available for use by <<gateway-route-filters,`GatewayFilter` factories>>
197199

0 commit comments

Comments
 (0)