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]

    咪卡恰比 發表在 痞客邦 留言(0) 人氣()