org.springframework.web.client.RestTemplate方法退出机会(..)抛出作为org.springframework.web.client.HttpStatusCodeException,父对象的RestClientException当restTeamplte.exchange(...)会抛出这个异常吗?
我检查了javadoc,并试图在互联网上搜索它,但没有成功。
try {
final ResponseEntity<String> response = applicationApiTemplate.exchange(uri,
HttpMethod.GET, entity, String.class);
} catch(HttpStatusCodeException e) {
// when possibly i will get this error?
}
https://stackoverflow.com/questions/56232211
复制相似问题