我已经在我的dispatcher-servlet.xml
Spring MVC的3.1 - 命名空间的错误
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.1.xsd">
XML验证失败之后说
无效的含量被发现与一个元素开始 '上下文:组件扫描'。 '{“http://www.springframework.org/schema/mvc":argument-resolvers,”http://www.springframework.org/ schema/mvc“:return-value-handlers}'之一。
我检查了在 http://www.springframework.org/schema/mvc/
中定义的模式,一切似乎都没有问题。以前我使用Spring mvc 3.0,并没有遇到任何问题。我有我的所有jar文件直接在WEB-INF/lib
。有任何想法吗?
更新
这是验证失败<context:component-scan base-package="com" />
线路,是所有使用的罐子从春季3.1
是3.1版的所有罐子吗? – Ralph 2012-03-20 16:16:35
@skaffman:已更新问题以提供信息 – Raghav 2012-03-20 16:25:38