diff --git a/springboot-aop/src/main/java/com/xncoding/aop/aspect/LogAspect.java b/springboot-aop/src/main/java/com/xncoding/aop/aspect/LogAspect.java index 36d6644..1af9a52 100644 --- a/springboot-aop/src/main/java/com/xncoding/aop/aspect/LogAspect.java +++ b/springboot-aop/src/main/java/com/xncoding/aop/aspect/LogAspect.java @@ -53,15 +53,14 @@ public class LogAspect { //环绕通知,环绕增强,相当于MethodInterceptor @Around("webLog()") - public Object arround(ProceedingJoinPoint pjp) { + public Object arround(ProceedingJoinPoint pjp) throws Throwable{ System.out.println("方法环绕start....."); try { Object o = pjp.proceed(); System.out.println("方法环绕proceed,结果是 :" + o); return o; } catch (Throwable e) { - e.printStackTrace(); - return null; + throw e; } } } \ No newline at end of file