spring path格式
org.springframework.util
Class AntPathMatcher
java.lang.Object

org.springframework.util.AntPathMatcher
- All Implemented Interfaces:
- PathMatcher
public class AntPathMatcherextends Objectimplements PathMatcher
PathMatcher implementation for Ant-style path patterns. Examples are provided below.
Part of this mapping code has been kindly borrowed from Apache Ant.
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.jspbut alsocom/tast.jsporcom/txst.jspcom/*.jsp- matches all.jspfiles in thecomdirectorycom/**/test.jsp- matches alltest.jspfiles underneath thecompathorg/springframework/**/*.jsp- matches all.jspfiles underneath theorg/springframeworkpathorg/**/servlet/bla.jsp- matchesorg/springframework/servlet/bla.jspbut alsoorg/springframework/testing/servlet/bla.jspandorg/servlet/bla.jsp
- Since:
- 16.07.2003
- Author:
- Alef Arendsen, Juergen Hoeller, Rob Harrop, Arjen Poutsma
浙公网安备 33010602011771号