标签:
<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小鬼
标签:
原文地址:http://www.cnblogs.com/cd-xiaogui/p/5066137.html