废话不多说,直接上代码:
新建一个类,打上注解
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19@Component @Aspect public class addBranchShopAOP{ /** * 指定切方法 */ @Pointcut("execution(* easy.quick.user.controller.ShopController.addBranchShop(..))") public void access() { } @Before("access()") public void deBefore(JoinPoint joinPoint) throws Throwable { } @After("access()") public void logServiceAccesster(JoinPoint joinPoint){ //这里写需要实现的代码 } }
最后
以上就是优秀哈密瓜最近收集整理的关于SpringCloud之AOP的实现的全部内容,更多相关SpringCloud之AOP内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复