Skip to content

Commit ef10ac6

Browse files
committed
Align WebFlux with WebMvc for pathWithinHandlerMapping
See gh-25174
1 parent 3295034 commit ef10ac6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spring-webflux/src/main/java/org/springframework/web/reactive/result/method/AbstractHandlerMethodMapping.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ private void addMatchingMappings(Collection<T> mappings, List<Match> matches, Se
366366
* @param exchange the current exchange
367367
*/
368368
protected void handleMatch(T mapping, HandlerMethod handlerMethod, ServerWebExchange exchange) {
369+
String lookupPath = exchange.getRequest().getPath().pathWithinApplication().value();
370+
exchange.getAttributes().put(PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, lookupPath);
369371
}
370372

371373
/**

0 commit comments

Comments
 (0)