修复异常处理不打印

This commit is contained in:
林志强 2018-09-19 18:40:26 +08:00
parent a5417dda3e
commit 1593e7f3dc

View File

@ -53,15 +53,14 @@ public class LogAspect {
//环绕通知,环绕增强相当于MethodInterceptor //环绕通知,环绕增强相当于MethodInterceptor
@Around("webLog()") @Around("webLog()")
public Object arround(ProceedingJoinPoint pjp) { public Object arround(ProceedingJoinPoint pjp) throws Throwable{
System.out.println("方法环绕start....."); System.out.println("方法环绕start.....");
try { try {
Object o = pjp.proceed(); Object o = pjp.proceed();
System.out.println("方法环绕proceed结果是 :" + o); System.out.println("方法环绕proceed结果是 :" + o);
return o; return o;
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); throw e;
return null;
} }
} }
} }