AOP实现方式二
applicationContext.xml
<!--方法二 自定义类-->
<bean id="diyPointCut" class="com.shao.diy.DiyPointCut"/>
<aop:config>
<aop:aspect ref="diyPointCut" >
<!--切入点-->
<aop:pointcut id="point" expression="execution(* com.shao.service.UserServiceImpl.*(..))"/>
<!--通知-->
<aop:before method="before" pointcut-ref="point"/>
<aop:after method="after" pointcut-ref="point"/>
</aop:aspect>
</aop:config>
主要是给自己看的,所以肯定会出现很多错误哈哈哈哈哈

浙公网安备 33010602011771号