Spring Cvc-elt.1:cannot Find the declaration of element ' beans ' solution

Source: Internet
Author: User

Reprinted from http://blog.csdn.net/legendj/article/details/9950963


Today, when writing the spring AOP example, a red fork appears after adding the spring AOP schema in the Spring.xml file, and the spring configuration file is as follows:

    <?XML version= "1.0" encoding= "UTF-8"?>      <Beansxmlns= "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"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-contex T-3.0.xsd HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP Http://www.springframework.org/schema/aop/spring-aop-3.0.xs D ">            </Beans>  

Hint says: Cvc-elt.1:cannot find the declaration of element ' Beans ',

Search from the Internet, some say because the network is not access to the XSD file, because access to the XSD file on the network, we can access the local Ah, in the introduction of the spring package There are spring-beans-3.0.xsd files in the Spring-beans-3.2.2.release.jar, and the other XSD files can be found in the corresponding packages, so it's all right to change the XSD file references to local files:

    <?XML version= "1.0" encoding= "UTF-8"?>      <Beansxmlns= "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"xsi:schemalocation= "Http://www.springframework.org/schema/beans Classpath:/org/springframework/beans/factory/xml/spring-bean S-3.0.xsd Http://www.springframework.org/schema/context classpath:/org/springframework/context/config/spring-c Ontext-3.0.xsd HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP classpath:/org/springframework/aop/config/spring-aop-3 .0.xsd ">                </Beans>  

OK Error resolution

Spring Cvc-elt.1:cannot Find the declaration of element ' beans ' solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.