org.springframework.util Class AntPathMatcher
org.springframework.util.AntPathMatcher
- All Implemented Interfaces:
public class AntPathMatcherextends implements
PathMatcher implementation for Ant-style path patterns. Examples are provided below.
Part of this mapping code has been kindly borrowed from .
The mapping matches URLs using the following rules:
- ? matches one character
- * matches zero or more characters
- ** matches zero or more 'directories' in a path
Some examples:
com/t?st.jsp
- matchescom/test.jsp
but alsocom/tast.jsp
orcom/txst.jsp
com/*.jsp
- matches all.jsp
files in thecom
directorycom/**/test.jsp
- matches alltest.jsp
files underneath thecom
pathorg/springframework/**/*.jsp
- matches all.jsp
files underneath theorg/springframework
pathorg/**/servlet/bla.jsp
- matchesorg/springframework/servlet/bla.jsp
but alsoorg/springframework/testing/servlet/bla.jsp
andorg/servlet/bla.jsp
- Since:
- 16.07.2003 Author:
- Alef Arendsen, Juergen Hoeller, Rob Harrop, Arjen Poutsma