Ant通配符
来源:互联网 发布:阿里云备案幕布尺寸 编辑:程序博客网 时间:2024/05/05 20:46
Ant通配符
我们常用的匹配模式有ANT模式,比如acegi可以用PATTERN_TYPE_APACHE_ANT来使用ANT匹配模式,那什么是ANT匹配模式呢。
ANT通配符有三种:
通配符 说明
? 匹配任何单字符
* 匹配0或者任意数量的字符
** 匹配0或者更多的目录
例子:
URL路径 说明
/app
/*.x 匹配(Matches)所有在app路径下的.x文件
/app/p?ttern 匹配(Matches) /app/pattern 和 /app/pXttern,但是不包括/app/pttern
/**/
example 匹配(Matches) /app/example, /app/foo/example, 和 /example
/app
/**/
dir/file. 匹配(Matches) /app/dir/file.jsp, /app/foo/dir/file.html,/app/foo/bar/dir/file.pdf, 和 /app/dir/file.java
/**/
*.jsp 匹配(Matches)任何的.jsp 文件
属性:
最长匹配原则(has more characters)
说明,URL请求/app/dir/file.jsp,现在存在两个路径匹配模式
/**/
*.jsp和/app/dir/*.jsp,那么会根据模式/app/dir/*.jsp来匹配
转自:http://www.cnblogs.com/cyjch/archive/2012/03/28/2421353.html
0 0
- ant 通配符
- ant 通配符
- ant 通配符
- ant通配符
- Ant通配符
- Ant通配符
- ant之通配符
- Ant-通配符的应用
- Ant * 星号通配符
- Ant应用(二)通配符
- 通配符
- 通配符
- 通配符
- 通配符
- 通配符
- 通配符
- 通配符
- 通配符
- 【noip2016集训总结】
- 进程与线程及其区别
- 泛型(genericity)
- mysql 批量更新与批量更新多条记录的不同值实现方法
- NOIP赛前模拟总结
- Ant通配符
- 深入理解 RecyclerView 系列之一:ItemDecoration
- 第七篇 zabbix监控本机
- win10+vs2015编译osg 3.4.0
- ReactiveCocoa 中 RACSignal 是如何发送信号的
- From表单提交刷新页面?
- log4j.xml
- [hive]动态分区和静态分区
- Linux下执行脚本提示No such file or directory