码迷,mamicode.com
首页 > 编程语言 > 详细

讨厌的错误(Spring mvc 拦截器)

时间:2015-12-22 12:56:19      阅读:266      评论:0      收藏:0      [点我收藏+]

标签:

  <mvc:exclude-mapping path="/sys/login"/>

报错

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, "http://www.springframework.org/schema/beans":ref}‘ is expected.

 

 

看配置

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
">

 

费劲力气,终于找到问题,3.0不支持,我就一顿狂笑,为什么之前没报错,换个机器就报错了,这就是人品问题?当然不能屈服,我偷偷改成3.2的

xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
">

就在这时出奇迹了,居然可恶的报错没有了,以后大家遇到了,这可以这么干了。哈哈



                                                          -----------------------------------------------------------------------cd小鬼

讨厌的错误(Spring mvc 拦截器)

标签:

原文地址:http://www.cnblogs.com/cd-xiaogui/p/5066137.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!