From 1593e7f3dc98bcb54bc89e88ac7b3a7f4a6106c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=BF=97=E5=BC=BA?= Date: Wed, 19 Sep 2018 18:40:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=82=E5=B8=B8=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=B8=8D=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/xncoding/aop/aspect/LogAspect.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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