RestClientException
2021-06-08 10:29:08 0 举报
RestClientException 详解
作者其他创作
大纲/内容
throw ResourceAccessException
catch (IOException )
HttpMessageNotReadableException
response extractData
finallyresponse.close()
ResourceAccessException
读取response流,字符转换
HttpMessageConversionException
NestedRuntimeException
throw IOExceptionHttpMessageNotReadableExceptionRestClientException(没有匹配的HttpMessageConverter)
根据response状态码,处理异常
捕获IOException,转成ResourceAccessException抛出
HttpMessageNotWritableException
HttpStatusCodeException
throw IOExceptionHttpMessageNotWritableExceptionRestClientException(没有匹配的HttpMessageConverter)
RuntimeException
HttpServerErrorException
handleResponse
HttpClientErrorException
execute
doWithRequest
doExecute
try
UnknownHttpStatusCodeException
IOException
createRequest
throw IOExceptionNoHttpResponseException
装载http header,http body 根据配置的HttpMessageConverter做字符对象转换
NoHttpResponseException
RestClientException
1 createHttpUriRequest(根据http method创建request)2 createHttpContext(创建HttpClientContext,填充属性http.request-config)
RestClientResponseException
40x,throw HttpClientErrorException50x,throw HttpServerErrorException其他情况,throw RestClientException(Unknown status code);
throw IOException
request.execute() 拿到response
收藏
0 条评论
下一页
为你推荐
查看更多
抱歉,暂无相关内容