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