1
特定のパッケージ内のすべてのメソッドで発生しますが、カスタム注釈に基づいて起動するポイントカット式を作成しようとしています。ここでは、最初の実行では動作しますが、2番目では動作しません。助けてくれてありがとう!注釈を除外するSpring AOPポイントカット式
@AfterThrowing(pointcut = "execution(* services..*.*(..)) && !within(@services.annotation.IgnoreBusinessServiceExceptionTranslation *)", throwing = "ex")
public void exceptionThrown(Throwable ex){}
インタフェース:
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface IgnoreBusinessServiceExceptionTranslation
{}