There must be an argument to a method of the name denyForTeam, whose type must be a DenyForTeam annotation. @annotation - bind the annotation to a method argument with the same name.
@Around("execution(public * (@DisabledForBlockedAccounts *).*(..))" + " && @annotation(denyForTeam)") public Object translateExceptionsDenySelectedAccount(ProceedingJoinPoint pjp, Deny deny, DenyForTeam denyForTeam) throws Throwable {
If you do not want the annotation to be passed as an argument, include pointcut @DenyForTeam (full text) in the expression.
@Around("execution(@DenyForTeam public * (@DisabledForBlockedAccounts *).*(..))") public Object translateExceptionsDenySelectedAccount(ProceedingJoinPoint pjp, Deny deny) throws Throwable {
source share