日期:2014-05-19  浏览次数:20904 次

applicationContext.xml 里使用aop命名空间出错
XML code
<?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:tx="http://www.springframework.org/schema/tx"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/shema/aop http://www.springframework.org/shema/aop/spring-aop-2.0.xsd" >


报错就在我加入了aop命名空间开始。
为什么会在第一行提示错误呢。错误信息是这样的 
Referenced file contains errors (jar:file:/E:/Users/think/workspace/MyProjSpring/WebContent/WEB-INF/lib/spring.jar!/org/springframework/beans/factory/xml/spring-
 beans-2.5.xsd). For more information, right click on the message in the Problems View and select "Show Details..."



------解决方案--------------------
你spring的版本好像是2.5的嘛,把你写的2.0改为2.5