有如下兩個切點: 此時可以這麼寫 ...
有如下兩個切點:
@Pointcut("execution(public * com.wyh.data.controller.DepartmentController.*(..))")
public void department(){}
@Pointcut("execution(public * com.wyh.data.controller.UserController.*(..))")
public void user(){}
@Before("department()")//怎樣在這裡指定多個切點,逗號不可以
public void before(JoinPoint joinPoint){do something}
此時可以這麼寫
@Before("department()||user()")
public void before(JoinPoint joinPoint){do something}