配置文件 xml
spring 4.17
<aop:config proxy-target-class="true" />
<aop:config>
<!--定义切面-->
<aop:aspect id="logAspect" ref="saveInterceptor">
<!-- -->
<aop:pointcut expression="execution(* com.hy.erp.service..*.save*(..))" id="savePointCut"/>
<!--方法执行之前被调用执行的-->
<aop:before method="before" pointcut-ref="savePointCut"/><!--一个切入点的引用-->
<aop:after method="after" pointcut-ref="savePointCut"/><!--一个切入点的引用-->
</aop:aspect>
</aop:config>
service 下所有save方法会触发
用于日志 权限
确保spring 能扫描到他 加一个注解 简单有效