我创建了一个切入点 . 但它没有用 . 请帮我处理以下代码 . 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“>
<aop:aspectj-autoproxy />
<bean id="customerBo" class="com.mkyong.customer.bo.impl.CustomerBoImpl" />
<!-- Aspect -->
<bean id="logAspect" class="com.mkyong.aspect.LoggingAspect" />
2 回答
我认为你的问题在切入点定义中 . 你用
但是要在包及其所有子包中定义切入点(在您的情况下:实现包),语法将是
注意两点:
bo..*
而不是bo.*
XML将配置方面bean配置为
LoggingAspect
然后调用方面类MyAspect
是否有意义?