|
|
|
@ -34,11 +34,13 @@ public class WebExceptionResolver implements HandlerExceptionResolver {
|
|
|
|
|
|
|
|
|
|
// if json
|
|
|
|
|
boolean isJson = false;
|
|
|
|
|
if (handler instanceof HandlerMethod) {
|
|
|
|
|
HandlerMethod method = (HandlerMethod)handler;
|
|
|
|
|
ResponseBody responseBody = method.getMethodAnnotation(ResponseBody.class);
|
|
|
|
|
if (responseBody != null) {
|
|
|
|
|
isJson = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// error result
|
|
|
|
|
ReturnT<String> errorResult = new ReturnT<String>(ReturnT.FAIL_CODE, ex.toString().replaceAll("\n", "<br/>"));
|
|
|
|
|