java中配置自定义拦截器中exclude-mapping path是什么意思?
2024-08-29 11:48:20
- <mvc:interceptors>
- <mvc:interceptor>
- <mvc:mapping path="/**"/>//过滤全部请求
- <mvc:exclude-mapping path="/hello.html"/> //除了hello这个请求
- <bean class="net.spring.interceptor.TestInterceptor" />
- </mvc:interceptor>
- </mvc:interceptors>
把http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd改成http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
不然会报:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'mvc:exclude-mapping'. One
of '{"http://www.springframework.org/schema/mvc":mapping, "http://www.springframework.org/
schema/beans":bean}' is expected.
因为mvc:exclude-mapping 标签不被spring-mvc-3.0.xsd支持,该配置在spring-mvc-3.2.xsd中
最新文章
- Java提高篇——理解String 及 String.intern() 在实际中的应用
- 水果姐逛水果街Ⅱ codevs 3305
- 希尔排序(Shell)
- Learning to write a compiler
- c#基础-oop(面向对象理解)
- 【洛谷P3258】松鼠的新家
- 轻量级应用开发之(04)UIScrollView-1
- MAC 升级到10.10(OS X Yosemite)下apache+php的配置问题
- 10465 - Homer Simpson 贪心
- unix io 模型浅析
- crowd在更改IP后无法登录的问题
- MVC 中使用uploadify上传图片遇到的蛋疼问题
- 有用的HTML+CSS片段
- jQuery简要dom操作
- if(){}else 语句的正确写法以及它的嵌套使用
- 移动开发必须要弄明白的问题】详解Eclipse转Android Studio
- CJOJ 1087 【NOIP2010】乌龟棋 / Luogu 1541 乌龟棋(动态规划)
- eclipse web开发Server配置
- js调用摄像头
- css换行