我有一个类,在com.oms.service包下面,有以下两个方法
public int update(User user){
return userDao.update(user);
}
public void del(int id){
userDao.del(id);
}
bean.xml中AOP配置如下:
<bean id="logInterceptor" class="com.oms.aop.LogInterceptor"></bean>
<!-- 方法1 -->
<aop:config>
<aop:aspect id="logAspect" ref="logInterceptor">
<aop:before method="beforeMethod" pointcut="execution(public * com.oms.service..*update(..))" />
</aop:aspect>
</aop:config>
<!-- 方法2????加不上??? -->
<aop:config>
<aop:aspect id="logAspect" ref="logInterceptor">
<aop:before method="beforeMethod" pointcut="execution(public * com.oms.service..*del(..))" />
</aop:aspect>
</aop:config>
现在的问题是:
方法1 能 weave 切面方法, 但方法2 不能 weave ?