0
我有一个@Before方法,它返回一些我希望在切入点内使用的标记。AspectJ是否有一种方法可以从Before获取返回值并在切入点内使用它?
@Pointcut("execution(getData())")
private void selectAll(){}
@Before("selectAll()")
public void beforeAdvice(ProceedingJoinPoint joinPoint) throws Throwable{
//Return the token
}
public void getData(){
//Is there a way I can use the token returned by before??
}
@After("selectAll()")
public void afterAdvice(ProceedingJoinPoint joinPoint) throws Throwable{
//destroy the token
}
有没有一种方法可以使用getData()之前返回的标记?