大家好,正在写一个spring的小例子,但是配置文件报错了,在aop:pointcut提示:Description Resource Path Location Type
cvc-complex-type.2.4.a: Invalid content was found starting with element 'aop:pointcut'. One of '{"http://www.springframework.org/schema/aop":aspect}' is expected.
而且<aop:before>和<aop:after>也打不出来,请问大家怎么解决?
<?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="businessIntf1" class="com.spring.chapter1.impl.BusinessImpl1"/>
<bean id="businessIntf2" class="com.spring.chapter1.impl.BusinessImpl2">
<constructor-arg ref="businessIntf1" />
</bean>
<bean id="businessIntf3" class="com.spring.chapter1.impl.BusinessImpl3"/>
<aop:config>
<aop:aspect ref="businessIntf3" />
<aop:pointcut id="saySome" expression="execution{* *.b3Say(..)}" />
</aop:config>
</beans>
------解决思路----------------------
<aop:aspect> 要写在这个标签里面吧?你写外面去了..