This commit is contained in:
iizmg
2019-05-13 13:08:50 +08:00
parent d838101a4f
commit a067c73f30
@@ -30,13 +30,15 @@ public class ExceptionHandle extends ResponseEntityExceptionHandler {
httpStatus = objectResponseEntity.getStatusCode();
headers = objectResponseEntity.getHeaders();
body = objectResponseEntity.getBody();
} finally {
return this.handleExceptionInternal(e, body, headers, httpStatus, req);
} catch (Exception ex) {
log.warn("非系统异常,转入自定义异常处理逻辑:{}", e.getMessage());
}
return this.handleExceptionInternal(e, body, headers, httpStatus, req);
}
@Override
protected ResponseEntity<Object> handleExceptionInternal(Exception ex, Object body, HttpHeaders headers, HttpStatus status, WebRequest request) {
log.error("错误日志:", ex);
return super.handleExceptionInternal(ex, body, headers, status, request);
}
}