diff --git a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java index 4f9fdfc9249..3132b1c46e0 100644 --- a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java +++ b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java @@ -52,6 +52,11 @@ import java.util.regex.Pattern; * {@code org/springframework/testing/servlet/bla.jsp} and {@code org/servlet/bla.jsp} * * + *

Note: a pattern and a path must both be absolute or must + * both be relative in order for the two to match. Therefore it is recommended + * that users of this implementation to sanitize patterns in order to prefix + * them with "/" as it makes sense in the context in which they're used. + * * @author Alef Arendsen * @author Juergen Hoeller * @author Rob Harrop