try catch use:
if(e instanceof RestClientException && e.getCause() instanceof HttpMessageNotReadableException) {
//TODO
}
org.springframework.web.client.RestClientException: Error while extracting response for type [class com.test.res] and content type [application/json;charset=UTF-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null'); nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: (PushbackInputStream); line: 1, column: 2]
文章標籤
全站熱搜
留言列表