I\'m having a bit of trouble working out how to create a pointcut that will operate on beans that have a specific annotated parameter. My eventual aim is to validate the val
This is what I ended up at after fiddling about with it (imports omitted):
@Aspect
public class VerifyAspect {
@Before("execution(* *(.., @annotations.MyAnnotation (*), ..)) && args(.., verifyMe)")
public void verifyInvestigationId(final Object verifyMe) {
System.out.println("Aspect verifying: " + verifyMe);
}
}
No need for anything Spring-specific, as AspectJ already provides you with the parameters if so desired.