Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/322.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Spring MVC 3.1-命名空间错误_Java_Spring_Spring Mvc - Fatal编程技术网

Java Spring MVC 3.1-命名空间错误

Java Spring MVC 3.1-命名空间错误,java,spring,spring-mvc,Java,Spring,Spring Mvc,我的dispatcherservlet.xml中有以下内容 <?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-i

我的
dispatcherservlet.xml中有以下内容

<?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:参数解析程序http://www.springframework.org/ 应为schema/mvc“:返回值处理程序}”

我已经检查了中定义的模式
http://www.springframework.org/schema/mvc/
一切似乎都很好。以前我使用的是SpringMVC3.0,它没有遇到任何问题。我所有的jar文件都直接放在
WEB-INF/lib
中。有什么想法吗

更新


这是验证失败的那一行,是的,所有使用的JAR都来自Spring 3.1,但是查看模式和给出的错误,您可能是试图将
-元素放在
-标记中,还是忘记关闭
-标记?将组件扫描放在标记外或正确关闭
-标记。

可能是错误的,但查看架构和给出的错误,您可能是试图将
-元素放置在
-标记内,还是忘记关闭
-标记?将组件扫描放在标签外或正确关闭
-标签。

是否所有3.1版的罐子?@skaffman:是否已更新问题以提供信息?是否所有3.1版的罐子?@skaffman:是否已更新问题以提供信息非常感谢。是的,我忘了关窗户。我真傻。半个多小时以来,我一直在想问题出在哪里。我得检查一下我的眼睛:非常感谢。是的,我忘了关窗户。我真傻。半个多小时以来,我一直在想问题出在哪里。我得检查一下眼睛:P