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

Source: Internet
Author: User
Tags aop xmlns

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"?> <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 "
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/AOP 
Http://www.springframework.org/schema /aop/spring-aop-3.0.xsd
">

</beans>

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

Search from the Internet some, some say because the network reason to access the XSD file, because access to the XSD file on the network, we can access the local Ah, In the introduction of Spring package Spring-beans-3.2.2.release.jar in the Spring-beans-3.0.xsd file, the other XSD files can also be found in the corresponding package, so to say, the XSD file references are all changed to a local file:

<?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 " 
xsi:schemalocation="/
http/ Www.springframework.org/schema/beans 
classpath:/org/springframework/beans/factory/xml/spring-beans-3.0.xsd 
Http://www.springframework.org/schema/context 
classpath:/org/springframework/context/config/ Spring-context-3.0.xsd
HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP 
classpath:/org/springframework/aop/ Config/spring-aop-3.0.xsd
">
	
</beans>


OK Red Fork disappears

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.