SpringMVC注解驱动报错

用myeclipse2016写代码,使用注解开发时,xml文件有错误
代码如下

 <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/tx
        http://www.springframework.org/schema/tx/spring-tx.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd">
    <!-- 注解驱动包含了注解的处理器映射器和处理器适配器的配置 -->
    <mvc:annotation-driven></mvc:annotation-driven>
    <!-- 组件扫描会扫描指定包路径下的含有controller注解的类 -->
    <context:component-scan base-package="controller"></context:component-scan>
    <!-- 处理器视图解析器 -->
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"></bean>
</beans>

错误如下:
图片说明

第19行错误

 Multiple annotations found at this line:
    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:annotation-driven'.
    - schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/mvc/spring-mvc.xsd', because 1) could not 
     find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

附jar包图
图片说明
求大家指点一下,错误在什么地方

1个回答

检查一下xml文件最上方的引用是不是写错了。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!