2 Commits

Author SHA1 Message Date
8f146f0389 !1 修复 AOP的案例,调用/doError时异常不打印
Merge pull request !1 from 海王星Ivan/master
2018-09-23 13:48:00 +08:00
1593e7f3dc 修复异常处理不打印 2018-09-19 18:40:26 +08:00

View File

@ -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;
}
}
}