Мне написан один аспект, который я хочу, когда бы это ни вызывалось или возникало какое-либо исключение, мы перенаправили его на http://google.com
@AfterThrowing(pointcut = "execution(* com.ts.templateService.*.*(..))", throwing = "e")
public void LocalAfterThrowing(JoinPoint joinPoint, Throwable e) {
Signature signature = joinPoint.getSignature();
String methodName = signature.getName();
String stuff = signature.toString();
String arguments = Arrays.toString(joinPoint.getArgs());
System.out.println("Got Exception in the Method: "
+ methodName + " with arguments "
+ arguments + "\nand the full toString: " + stuff + "\nthe exception is: "
+ e.getMessage());
}