aop的环绕通知存在的情况下配置全局异常失去作用 ,主要是因为在环绕通知中将发生的异常没有抛出从而导致全局异常捕获不到.
解决方案就是讲aop环绕通知中的异常再次抛出
@Aspect
@Component
public class LogAspect {
@Pointcut("@annotation(com.dh.platform.entity.LogAnnotate)")
public void logPoint(){
}
@Around(value = "logPoint()")
public Object aroundAdvice(ProceedingJoinPoint joinPoint) throws Throwable {
long startTime = 0,endTime = 0;
TableOperateLog operateLog=finishTableOperateLog();
String[] methods=joinPoint.getSignature()