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