记得加入:
xmlns:aop="http://www.springframework.org/schema/aop
xsi:schemaLocation="http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd"
aop配置:
<aop:config proxy-target-class="true">
<aop:aspect ref="homeAspect">
<aop:pointcut expression="execution(* com.test.*.dao.*.*(..))"
id="register" />
<aop:before method="after" pointcut-ref="register" />
</aop:aspect>
</aop:config>
注;aop:pointcut 配置中 * com.test.*.dao.*.*(..)表示dao这个包下面所有类的所有方法