错误在Xml文件多个Anontations中无法理解

时间:2013-05-01 14:51:51

标签: xml spring

我将Eclipse中的项目错误输入到我的XML文件中:

Multiple annotations found at this line:
    - cvc-elt.1: Cannot find the declaration of element 'beans'.
    - schema_reference.4: Failed to read schema document 'http://
     www.springframework.org/schema/beans/spring-beans-3.0.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>.

当我只写一个空格然后保存文件时,错误消失,但在它再次返回之后。任何艾迪亚?谢谢


这是我的XML文件的内容

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
    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.xsd">

    <mvc:annotation-driven />   
    <context:component-scan base-package="gestion.delegation.controller" />
    <bean       class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix">
            <value>/WEB-INF/pages/</value>
        </property>
        <property name="suffix">
            <value>.jsp</value>
        </property>
    </bean>
    <bean id="AddUserValidator" class="gestion.delegation.validator.AddUserValidator" />
</beans>    

0 个答案:

没有答案