我们有时候会希望这样:
@拦截的注解
private void 我是被拦截的函数() {
... ....
}
//环绕通知
@Around("...")
public void roundRun(ProceedingJoinPoint joinPoint) {
try {
//执行被拦截的函数
joinPoint.proceed();
//做一些记录或者业务逻辑判断
... ...
} catch (Throwable e) {
throw new RuntimeException(e);
}
}
在“做一...