diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java index 668a3826619..06a9bf71253 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java @@ -386,6 +386,9 @@ public abstract class RequestPredicates { if (!subPath.startsWith("/")) { subPath = "/" + subPath; } + if (requestPath.endsWith("/") && !subPath.endsWith("/")) { + subPath += "/"; + } return new SubPathServerRequestWrapper(request, subPath); }