多个增强用||,怎么个用法

来源:3-7 切点命名

明月_0

2020-02-23 17:27:34

http://img.mukewang.com/climg/5e524503099b695f11240507.jpg

@Before(value = "myPointcut1()")
public void before(JoinPoint joinPoint){

   System.out.println("前置通知========="+joinPoint);
}


value里@Before(value = "myPointcut1()"|| "myPointcut2()")吗?

写回答

1回答

好帮手慕珊

2020-02-23

同学,你好!多个增强可以这么写:@Before(value = "myPointcut1()|| myPointcut2()")

如果我的回答解决了你的疑惑,请采纳!祝学习愉快!

0

0 学习 · 8263 问题

查看课程