I have this aspect that is called on every method annotated with @LogActivity
annotation.
@Aspect
@Component
public class EndpointAspect {
@Around("@annotation(LogActivity)")
public Object logActivity(ProceedingJoinPoint joinPoint) throws Throwable {
Object result = joinPoint.proceed();
// I want to access message here. see below
return result;
}
}
And this is one annotated method:
public class contrlr {
@LogActivity
@GetRequest("/home")
public String aMethod() {
String message = "some RUNTIME-GENERATED message"; // I want to send it to aspect
return "home.html"
}
}
I want to pass the message
to aspect. note that message
may not be hard-coded constant. How to do that?