error Type referred to is not an annotation type:
I solved my issue by specifying the package explicitly
change the following
@Around("@annotation(SessionCheck)")
public Object checkSessionState(ProceedingJoinPoint joinPoint) throws Throwable {
// code here
}
to
@Around("@annotation(my.aop.annotation.SessionCheck)")
public Object checkSessionState(ProceedingJoinPoint joinPoint) throws Throwable {
// code here
}
or put them in the same package
There needs to be a method argument of the name denyForTeam whose type should be 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 don't want the annotation passed as an argument then include the @DenyForTeam (full qualified) in the pointcut expression.
@Around("execution(@DenyForTeam public * (@DisabledForBlockedAccounts *).*(..))")
public Object translateExceptionsDenySelectedAccount(ProceedingJoinPoint pjp, Deny deny) throws Throwable
{