fix: 尝试解决后台日志输出converter的问题
This commit is contained in:
parent
0e964a9443
commit
45cd225c66
|
@ -114,11 +114,17 @@ public class RestControllerExceptionHandler {
|
|||
}
|
||||
|
||||
@ExceptionHandler({Exception.class})
|
||||
public ResponseEntity<ResultHolder> handlerException(Exception e) {
|
||||
if (e instanceof EofException) {
|
||||
public ResponseEntity<ResultHolder> handleException(Exception e) {
|
||||
return ResponseEntity.internalServerError()
|
||||
.body(ResultHolder.error(MsHttpResultCode.FAILED.getCode(),
|
||||
e.getMessage(), null));
|
||||
e.getMessage(), getStackTraceAsString(e)));
|
||||
}
|
||||
|
||||
@ExceptionHandler({EofException.class})
|
||||
public ResponseEntity<Object> handleEofException(HttpServletRequest request, Exception e) {
|
||||
String requestURI = request.getRequestURI();
|
||||
if (StringUtils.startsWith(requestURI, "/assets")) {
|
||||
return ResponseEntity.internalServerError().body(null);
|
||||
}
|
||||
return ResponseEntity.internalServerError()
|
||||
.body(ResultHolder.error(MsHttpResultCode.FAILED.getCode(),
|
||||
|
|
Loading…
Reference in New Issue