List of usage examples for org.springframework.http.converter HttpMessageNotReadableException getLocalizedMessage
public String getLocalizedMessage()
From source file:cn.org.once.cstack.config.RestHandlerException.java
@Override protected ResponseEntity<Object> handleHttpMessageNotReadable(HttpMessageNotReadableException ex, HttpHeaders headers, HttpStatus status, WebRequest request) { ex.printStackTrace();/*from w ww . ja v a2s . c om*/ headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); return handleExceptionInternal(ex, new HttpErrorServer(ex.getLocalizedMessage()), headers, HttpStatus.BAD_REQUEST, request); }