我只是问了一个问题:Spring xml problem 我解决了这个问题,但现在我得到了另一个问题:Spring XML中的问题部分2
Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [ http://www.springframework.org/schema/aop]
我的XML:
<?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: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/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<bean id="audience" class="springaop.Audience">
</bean>
<bean id="sam" class="springaop.Singer">
<property name="id" value="1"></property>
</bean>
<aop:config>
<aop:aspect ref="audience">
<aop:before pointcut="* springaop.Singer.perform(..)"
method="takeSeats"></aop:before>
</aop:aspect>
</aop:config>
</beans>
我使用Spring 3.1。 0.M2
尝试使用3.0.5.RELEASE。 3.1里程碑版本是不稳定和越野车。 – skaffman
使用3.0.5我得到:“意外的异常解析来自类路径资源[aop-conf.xml]的XML文档;嵌套异常是java.lang.NoClassDefFoundError:org/aopalliance/aop/Advice” –