Invalid content was found starting with element 'mvc:exclude-mapping'.

问题?Invalid content was found starting with element 'mvc:exclude-mapping'.


这是springmvc中显著的错误,在配置拦截器的时候,会用到不拦截某一些请求

如:

< mvc:interceptors> 
<span style="white-space:pre">	</span>< mvc:interceptor> 
<span style="white-space:pre">		</span>< mvc:mapping path=”/**”/>//过滤全部请求 
<span style="white-space:pre">		</span>< mvc:exclude-mapping path=”/hello.html”/> //除了hello这个请求 
<span style="white-space:pre">		</span>< bean class=”net.spring.interceptor.TestInterceptor” /> 
<span style="white-space:pre">	</span></mvc:interceptor> 
</mvc:interceptors> 

< mvc:exclude-mapping path=”/hello.html”/>
//除了hello这个请求 

这条语句就会出问题?会报以上的错误,Invalid content was found starting with element 'mvc:exclude-mapping'.原因是:mvc:exclude-mapping 标签不被spring-mvc-3.0.xsd支持,该配置在spring-mvc-3.2.xsd中支持。

把http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd改成http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd 

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值