クラスの使用
org.springframework.web.client.RestClientException
RestClientException を使用するパッケージ
org.springframework.web.client 内の RestClientException 使用
修飾子と型クラス説明classHTTP 4xx を受信したときにスローされる例外。static final classHttpClientErrorExceptionステータス HTTP 400 Bad Requeststatic final classHttpClientErrorExceptionステータス HTTP 409 Conflictstatic final classHttpClientErrorExceptionステータス HTTP 403 Forbiddenstatic final classHttpClientErrorExceptionステータス HTTP 410 Gonestatic final classHttpClientErrorExceptionステータス HTTP 405 Method Not Allowedstatic final classHttpClientErrorExceptionステータス HTTP 406 Not Acceptablestatic final classHttpClientErrorExceptionステータス HTTP 404 Not Foundstatic final classHttpClientErrorExceptionステータス HTTP 429 Too Many Requestsstatic final classHttpClientErrorExceptionステータス HTTP 401 Unauthorizedstatic final classHttpClientErrorExceptionステータス HTTP 422 Unprocessable Entitystatic final classHttpClientErrorExceptionステータス HTTP 415 Unsupported Media TypeclassHTTP 5xx を受信したときにスローされる例外。static final classHTTP ステータス 502BadGateway のHttpServerErrorException。static final classHttpServerErrorExceptionステータス HTTP 504 Gateway Timeoutstatic final classHttpServerErrorExceptionステータス HTTP 500 Internal Server Errorstatic final classHttpServerErrorExceptionステータス HTTP 501 Not Implementedstatic final classHttpServerErrorExceptionステータス HTTP 503 Service UnavailableclassHttpStatusCodeに基づく例外の抽象基本クラス。classI/O エラーが発生したときにスローされる例外。class実際の HTTP レスポンスデータを含む例外の共通基本クラス。classレスポンスを抽出するための適切なHttpMessageConverterが見つからなかった場合に発生します。class未知の(またはカスタムの)HTTP ステータスコードを受信したときにスローされる例外。型 RestClientException の型引数を持つ org.springframework.web.client のメソッドパラメーター修飾子と型メソッド説明voidExtractingResponseErrorHandler.setSeriesMapping(MapSE<HttpStatus.Series, ClassSE<? extends RestClientException>> seriesMapping) HTTP ステータスシリーズからRestClientExceptionサブクラスへのマッピングを設定します。voidExtractingResponseErrorHandler.setStatusMapping(MapSE<HttpStatusCode, ClassSE<? extends RestClientException>> statusMapping) HTTP ステータスコードからRestClientExceptionサブクラスへのマッピングを設定します。RestClientException をスローする org.springframework.web.client のメソッド修飾子と型メソッド説明void指定された URI のリソースを削除します。void指定された URI のリソースを削除します。void指定された URL のリソースを削除します。voidvoidvoidprotected <T> TRestTemplate.doExecute(URISE url, StringSE uriTemplate, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor) 指定された URI で指定されたメソッドを実行します。protected <T> TRestTemplate.doExecute(URISE url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor) 使用すべきではありません。<T> ResponseEntity<T>RestOperations.exchange(StringSE url, HttpMethod method, HttpEntity<?> requestEntity, ClassSE<T> responseType, ObjectSE... uriVariables) 指定された URI テンプレートに対して HTTP メソッドを実行し、指定されたリクエストエンティティをリクエストに書き込み、レスポンスをResponseEntityとして返します。<T> ResponseEntity<T>RestOperations.exchange(StringSE url, HttpMethod method, HttpEntity<?> requestEntity, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) 指定された URI テンプレートに対して HTTP メソッドを実行し、指定されたリクエストエンティティをリクエストに書き込み、レスポンスをResponseEntityとして返します。<T> ResponseEntity<T>RestOperations.exchange(StringSE url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, ObjectSE... uriVariables) 指定された URI テンプレートに対して HTTP メソッドを実行し、指定されたリクエストエンティティをリクエストに書き込み、レスポンスをResponseEntityとして返します。<T> ResponseEntity<T>RestOperations.exchange(StringSE url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, MapSE<StringSE, ?> uriVariables) 指定された URI テンプレートに対して HTTP メソッドを実行し、指定されたリクエストエンティティをリクエストに書き込み、レスポンスをResponseEntityとして返します。<T> ResponseEntity<T>RestOperations.exchange(URISE url, HttpMethod method, HttpEntity<?> requestEntity, ClassSE<T> responseType) 指定された URI テンプレートに対して HTTP メソッドを実行し、指定されたリクエストエンティティをリクエストに書き込み、レスポンスをResponseEntityとして返します。<T> ResponseEntity<T>RestOperations.exchange(URISE url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType) 指定された URI テンプレートに対して HTTP メソッドを実行し、指定されたリクエストエンティティをリクエストに書き込み、レスポンスをResponseEntityとして返します。<T> ResponseEntity<T>RestOperations.exchange(RequestEntity<?> requestEntity, ClassSE<T> responseType) 指定されたRequestEntityで指定されたリクエストを実行し、レスポンスをResponseEntityとして返します。<T> ResponseEntity<T>RestOperations.exchange(RequestEntity<?> requestEntity, ParameterizedTypeReference<T> responseType) 指定されたRequestEntityで指定されたリクエストを実行し、レスポンスをResponseEntityとして返します。<T> ResponseEntity<T>RestTemplate.exchange(StringSE url, HttpMethod method, HttpEntity<?> requestEntity, ClassSE<T> responseType, ObjectSE... uriVariables) <T> ResponseEntity<T>RestTemplate.exchange(StringSE url, HttpMethod method, HttpEntity<?> requestEntity, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) <T> ResponseEntity<T>RestTemplate.exchange(StringSE url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, ObjectSE... uriVariables) <T> ResponseEntity<T>RestTemplate.exchange(StringSE url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, MapSE<StringSE, ?> uriVariables) <T> ResponseEntity<T>RestTemplate.exchange(URISE url, HttpMethod method, HttpEntity<?> requestEntity, ClassSE<T> responseType) <T> ResponseEntity<T>RestTemplate.exchange(URISE url, HttpMethod method, HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType) <T> ResponseEntity<T>RestTemplate.exchange(RequestEntity<?> entity, ClassSE<T> responseType) <T> ResponseEntity<T>RestTemplate.exchange(RequestEntity<?> entity, ParameterizedTypeReference<T> responseType) <T> TRestOperations.execute(StringSE uriTemplate, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, ObjectSE... uriVariables) 指定された URI テンプレートに対して HTTP メソッドを実行し、RequestCallbackを使用してリクエストを準備し、ResponseExtractorを使用してレスポンスを読み取ります。<T> TRestOperations.execute(StringSE uriTemplate, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, MapSE<StringSE, ?> uriVariables) 指定された URI テンプレートに対して HTTP メソッドを実行し、RequestCallbackを使用してリクエストを準備し、ResponseExtractorを使用してレスポンスを読み取ります。<T> TRestOperations.execute(URISE url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor) 指定された URL に対して HTTP メソッドを実行し、RequestCallbackを使用してリクエストを準備し、ResponseExtractorを使用してレスポンスを読み取ります。<T> TRestTemplate.execute(StringSE uriTemplate, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, ObjectSE... uriVariables) 指定された URI テンプレートに対して HTTP メソッドを実行し、RequestCallbackを使用してリクエストを準備し、ResponseExtractorを使用してレスポンスを読み取ります。<T> TRestTemplate.execute(StringSE uriTemplate, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor, MapSE<StringSE, ?> uriVariables) 指定された URI テンプレートに対して HTTP メソッドを実行し、RequestCallbackを使用してリクエストを準備し、ResponseExtractorを使用してレスポンスを読み取ります。<T> TRestTemplate.execute(URISE url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor<T> responseExtractor) 指定された URL に対して HTTP メソッドを実行し、RequestCallbackを使用してリクエストを準備し、ResponseExtractorを使用してレスポンスを読み取ります。<T> ResponseEntity<T>RestOperations.getForEntity(StringSE url, ClassSE<T> responseType, ObjectSE... uriVariables) 指定された URL で GET を実行して、エンティティを取得します。<T> ResponseEntity<T>RestOperations.getForEntity(StringSE url, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) URI テンプレートで GET を実行して、表現を取得します。<T> ResponseEntity<T>RestOperations.getForEntity(URISE url, ClassSE<T> responseType) URL で GET を実行して表現を取得します。<T> ResponseEntity<T>RestTemplate.getForEntity(StringSE url, ClassSE<T> responseType, ObjectSE... uriVariables) <T> ResponseEntity<T>RestTemplate.getForEntity(StringSE url, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) <T> ResponseEntity<T>RestTemplate.getForEntity(URISE url, ClassSE<T> responseType) <T> TRestOperations.getForObject(StringSE url, ClassSE<T> responseType, ObjectSE... uriVariables) 指定された URL で GET を実行して、表現を取得します。<T> TRestOperations.getForObject(StringSE url, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) URI テンプレートで GET を実行して、表現を取得します。<T> TRestOperations.getForObject(URISE url, ClassSE<T> responseType) URL で GET を実行して表現を取得します。<T> TRestTemplate.getForObject(StringSE url, ClassSE<T> responseType, ObjectSE... uriVariables) <T> TRestTemplate.getForObject(StringSE url, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) <T> TRestTemplate.getForObject(URISE url, ClassSE<T> responseType) RestOperations.headForHeaders(StringSE url, ObjectSE... uriVariables) URI テンプレートで指定されたリソースのすべてのヘッダーを取得します。RestOperations.headForHeaders(StringSE url, MapSE<StringSE, ?> uriVariables) URI テンプレートで指定されたリソースのすべてのヘッダーを取得します。RestOperations.headForHeaders(URISE url) URL で指定されたリソースのすべてのヘッダーを取得します。RestTemplate.headForHeaders(StringSE url, ObjectSE... uriVariables) RestTemplate.headForHeaders(StringSE url, MapSE<StringSE, ?> uriVariables) RestTemplate.headForHeaders(URISE url) RestOperations.optionsForAllow(StringSE url, ObjectSE... uriVariables) 指定された URI のAllowヘッダーの値を返します。RestOperations.optionsForAllow(StringSE url, MapSE<StringSE, ?> uriVariables) 指定された URI のAllowヘッダーの値を返します。RestOperations.optionsForAllow(URISE url) 指定された URL のAllowヘッダーの値を返します。RestTemplate.optionsForAllow(StringSE url, ObjectSE... uriVariables) RestTemplate.optionsForAllow(StringSE url, MapSE<StringSE, ?> uriVariables) RestTemplate.optionsForAllow(URISE url) <T> TRestOperations.patchForObject(StringSE url, ObjectSE request, ClassSE<T> responseType, ObjectSE... uriVariables) 指定されたオブジェクトを URI テンプレートにパッチしてリソースを更新し、レスポンスで見つかった表現を返します。<T> TRestOperations.patchForObject(StringSE url, ObjectSE request, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) 指定されたオブジェクトを URI テンプレートにパッチしてリソースを更新し、レスポンスで見つかった表現を返します。<T> TRestOperations.patchForObject(URISE url, ObjectSE request, ClassSE<T> responseType) 指定されたオブジェクトを URL にパッチしてリソースを更新し、レスポンスで見つかった表現を返します。<T> TRestTemplate.patchForObject(StringSE url, ObjectSE request, ClassSE<T> responseType, ObjectSE... uriVariables) <T> TRestTemplate.patchForObject(StringSE url, ObjectSE request, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) <T> TRestTemplate.patchForObject(URISE url, ObjectSE request, ClassSE<T> responseType) <T> ResponseEntity<T>RestOperations.postForEntity(StringSE url, ObjectSE request, ClassSE<T> responseType, ObjectSE... uriVariables) 指定されたオブジェクトを URI テンプレートに POST して新しいリソースを作成し、レスポンスをResponseEntityとして返します。<T> ResponseEntity<T>RestOperations.postForEntity(StringSE url, ObjectSE request, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) 指定されたオブジェクトを URI テンプレートに POST して新しいリソースを作成し、レスポンスをHttpEntityとして返します。<T> ResponseEntity<T>RestOperations.postForEntity(URISE url, ObjectSE request, ClassSE<T> responseType) 指定されたオブジェクトを URL に POST して新しいリソースを作成し、レスポンスをResponseEntityとして返します。<T> ResponseEntity<T>RestTemplate.postForEntity(StringSE url, ObjectSE request, ClassSE<T> responseType, ObjectSE... uriVariables) <T> ResponseEntity<T>RestTemplate.postForEntity(StringSE url, ObjectSE request, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) <T> ResponseEntity<T>RestTemplate.postForEntity(URISE url, ObjectSE request, ClassSE<T> responseType) RestOperations.postForLocation(StringSE url, ObjectSE request, ObjectSE... uriVariables) 指定されたオブジェクトを URI テンプレートに POST して新しいリソースを作成し、Locationヘッダーの値を返します。RestOperations.postForLocation(StringSE url, ObjectSE request, MapSE<StringSE, ?> uriVariables) 指定されたオブジェクトを URI テンプレートに POST して新しいリソースを作成し、Locationヘッダーの値を返します。RestOperations.postForLocation(URISE url, ObjectSE request) 指定されたオブジェクトを URL に POST して新しいリソースを作成し、Locationヘッダーの値を返します。RestTemplate.postForLocation(StringSE url, ObjectSE request, ObjectSE... uriVariables) RestTemplate.postForLocation(StringSE url, ObjectSE request, MapSE<StringSE, ?> uriVariables) RestTemplate.postForLocation(URISE url, ObjectSE request) <T> TRestOperations.postForObject(StringSE url, ObjectSE request, ClassSE<T> responseType, ObjectSE... uriVariables) 指定されたオブジェクトを URI テンプレートに POST して新しいリソースを作成し、レスポンスで見つかった表現を返します。<T> TRestOperations.postForObject(StringSE url, ObjectSE request, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) 指定されたオブジェクトを URI テンプレートに POST して新しいリソースを作成し、レスポンスで見つかった表現を返します。<T> TRestOperations.postForObject(URISE url, ObjectSE request, ClassSE<T> responseType) 指定されたオブジェクトを URL に POST して新しいリソースを作成し、レスポンスで見つかった表現を返します。<T> TRestTemplate.postForObject(StringSE url, ObjectSE request, ClassSE<T> responseType, ObjectSE... uriVariables) <T> TRestTemplate.postForObject(StringSE url, ObjectSE request, ClassSE<T> responseType, MapSE<StringSE, ?> uriVariables) <T> TRestTemplate.postForObject(URISE url, ObjectSE request, ClassSE<T> responseType) void指定されたオブジェクトを URI に PUT することにより、リソースを作成または更新します。void指定されたオブジェクトを URI テンプレートに PUT することにより、新しいリソースを作成します。void指定されたオブジェクトを URL に PUT することにより、新しいリソースを作成します。voidvoidvoid
RestTemplate.doExecute(URI, String, HttpMethod, RequestCallback, ResponseExtractor)を推奨