I have an @Before method which is returning some token that I wish to use inside the pointcut.
@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
}
Is there a way I can use the token returned by before inside getData()?