我刚刚问了一个问题:Spring xml problem我解决了这个问题,但现在我又得到了一个问题:
配置问题:无法为XML模式命名空间[http://www.springframework.org/schema/aop]定位Spring
我的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>我使用Spring3.1.0.M2
发布于 2011-08-04 15:47:02
如果您的类路径上没有spring工件,您就会得到这个错误。如果您以某种方式包括了spring类,而没有从那个jar中获得META/spring.处理程序条目,那么您也会得到它。这个文件是Spring如何找到它的“命名空间处理程序”的。spring中的on告诉spring如何处理"http://www.springframework.org/schema/aop“命名空间。解决这个问题的一种方法是尝试创建一个胖罐子,其中包括几个弹簧罐。最后,您将用其他文件之一覆盖所有的spring.handlers文件,并丢失许多重要的条目。
https://stackoverflow.com/questions/6943710
复制相似问题