I am trying to create a pointcut expression that will fire on all methods in a certain package but not fire based on a custom annotation. Here is what i have so far that works for the first execution but not the second. Thanks for the help!
@AfterThrowing(pointcut = "execution(* services..*.*(..)) && !within(@services.annotation.IgnoreBusinessServiceExceptionTranslation *)", throwing = "ex")
public void exceptionThrown( Throwable ex ){}
Interface:
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface IgnoreBusinessServiceExceptionTranslation
{}