diff --git a/spring-web/src/main/java/org/springframework/web/util/patterns/CaptureTheRestPathElement.java b/spring-web/src/main/java/org/springframework/web/util/patterns/CaptureTheRestPathElement.java index ff2076abb8..659b28e74f 100644 --- a/spring-web/src/main/java/org/springframework/web/util/patterns/CaptureTheRestPathElement.java +++ b/spring-web/src/main/java/org/springframework/web/util/patterns/CaptureTheRestPathElement.java @@ -45,6 +45,12 @@ class CaptureTheRestPathElement extends PathElement { // No need to handle 'match start' checking as this captures everything // anyway and cannot be followed by anything else // assert next == null + + // If there is more data, it must start with the separator + if (candidateIndex