微调
This commit is contained in:
@@ -232,8 +232,10 @@ public class GlobalBusinessExceptionHandler {
|
||||
logService.recodeBusinessExceptionLog(tempException, httpServletRequest, exceptionCause);
|
||||
//判断方法上是否有自定义注解,做特殊处理
|
||||
Method method = ReflectCommonUtil.getMethod(exception);
|
||||
if(method.isAnnotationPresent(ReturnMsg.class)){
|
||||
return HttpResultUtil.assembleResult(code, null, StrFormatter.format("{}",exceptionCause));
|
||||
if (!Objects.isNull(method)){
|
||||
if(method.isAnnotationPresent(ReturnMsg.class)){
|
||||
return HttpResultUtil.assembleResult(code, null, StrFormatter.format("{}",exceptionCause));
|
||||
}
|
||||
}
|
||||
return HttpResultUtil.assembleResult(code, null, StrFormatter.format("{}{}{}", ReflectCommonUtil.getMethodDescribeByException(tempException), StrUtil.C_COMMA, exceptionCause));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user