学习antpath风格
我在哪里可以find资源学习Antpath样式约定? 我已经去了Ant站点,但是找不到path样式的任何信息。
spring-framework中的 Ant风格path模式匹配:
该映射使用以下规则匹配URL:
?匹配一个字符*匹配零个或多个字符**匹配path中的零个或多个“目录”一些例子:
com/t?st.jsp– 可以匹配com / test.jsp,也可以com/tast.jsp或com/txst.jspcom/*.jsp– 匹配com目录中的所有.jsp文件com/**/test.jsp– 匹配compath下的所有test.jsp文件org/springframework/**/*.jsp– 匹配org/springframework path下的所有.jsp文件org/**/servlet/bla.jsp– 匹配org/springframework/servlet/bla.jsp,还可以org/springframework/testing/servlet/bla.jsp和org/servlet/bla.jsp
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/util/AntPathMatcher.html
我想你的意思是如何使用path模式
如果是使用斜杠还是反斜杠,则会在执行期间使用的平台上转换为path分隔符。
ANT样式模式匹配器
通配符
该实用程序使用三个不同的通配符。
+----------+-----------------------------------+ | Wildcard | Description | +----------+-----------------------------------+ | * | Matches zero or more characters. | | ? | Matches exactly one character. | | ** | Matches zero or more directories. | +----------+-----------------------------------+