パッケージ org.springframework.web
クラス HttpRequestMethodNotSupportedException
java.lang.ObjectSE
java.lang.ThrowableSE
java.lang.ExceptionSE
jakarta.servlet.ServletException
org.springframework.web.HttpRequestMethodNotSupportedException
- 実装されたすべてのインターフェース:
SerializableSE
,ErrorResponse
public class HttpRequestMethodNotSupportedException
extends ServletExceptionEE
implements ErrorResponse
リクエストハンドラーが特定のリクエストメソッドをサポートしていない場合にスローされる例外。
- 導入:
- 2.0
- 作成者:
- Juergen Hoeller
- 関連事項:
ネストされたクラスのサマリー
インターフェース org.springframework.web.ErrorResponse から継承されたネストクラス / インターフェース
ErrorResponse.Builder
コンストラクターのサマリー
コンストラクター説明新しい HttpRequestMethodNotSupportedException を作成します。HttpRequestMethodNotSupportedException
(StringSE method, StringSE msg) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。HttpRequestMethodNotSupportedException
(StringSE method, StringSE[] supportedMethods) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。HttpRequestMethodNotSupportedException
(StringSE method, StringSE[] supportedMethods, StringSE msg) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。HttpRequestMethodNotSupportedException
(StringSE method, CollectionSE<StringSE> supportedMethods) 新しい HttpRequestMethodNotSupportedException を作成します。メソッドのサマリー
修飾子と型メソッド説明getBody()
レスポンスの本文を返します。RFC 7807ProblemDetail
としてフォーマットされ、status
はレスポンスステータスと一致する必要があります。ObjectSE[]
MessageSource
を介してこの例外の問題の「詳細」を解決するためにmessage code
と共に使用する引数を返します。レスポンスに使用するヘッダーを返します。失敗の原因となった HTTP リクエストメソッドを返します。レスポンスに使用する HTTP ステータスコードを返します。実際にサポートされている HTTP メソッドをHttpMethod
インスタンス、または不明の場合はnull
として返します。StringSE[]
実際にサポートされている HTTP メソッド、または不明な場合はnull
を返します。クラス jakarta.servlet.ServletExceptionEE から継承されたメソッド
getRootCauseEE
クラス java.lang.ThrowableSE から継承されたメソッド
addSuppressedSE, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCauseSE, printStackTrace, printStackTraceSE, printStackTraceSE, setStackTraceSE, toString
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSE
インターフェース org.springframework.web.ErrorResponse から継承されたメソッド
getDetailMessageArguments, getDetailMessageCode, getTitleMessageCode, updateAndGetBody
コンストラクターの詳細
HttpRequestMethodNotSupportedException
新しい HttpRequestMethodNotSupportedException を作成します。- パラメーター:
method
- サポートされていない HTTP リクエストメソッド
HttpRequestMethodNotSupportedException
@DeprecatedSE(since="6.0", forRemoval=true) public HttpRequestMethodNotSupportedException(StringSE method, StringSE msg) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。新しい HttpRequestMethodNotSupportedException を作成します。- パラメーター:
method
- サポートされていない HTTP リクエストメソッドmsg
- 詳細メッセージ
HttpRequestMethodNotSupportedException
public HttpRequestMethodNotSupportedException(StringSE method, @Nullable CollectionSE<StringSE> supportedMethods) 新しい HttpRequestMethodNotSupportedException を作成します。- パラメーター:
method
- サポートされていない HTTP リクエストメソッドsupportedMethods
- 実際にサポートされている HTTP メソッド (おそらくnull
)
HttpRequestMethodNotSupportedException
@DeprecatedSE(since="6.0", forRemoval=true) public HttpRequestMethodNotSupportedException(StringSE method, @Nullable StringSE[] supportedMethods) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。新しい HttpRequestMethodNotSupportedException を作成します。- パラメーター:
method
- サポートされていない HTTP リクエストメソッドsupportedMethods
- 実際にサポートされている HTTP メソッド (おそらくnull
)
HttpRequestMethodNotSupportedException
@DeprecatedSE(since="6.0", forRemoval=true) public HttpRequestMethodNotSupportedException(StringSE method, @Nullable StringSE[] supportedMethods, StringSE msg) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。新しい HttpRequestMethodNotSupportedException を作成します。- パラメーター:
method
- サポートされていない HTTP リクエストメソッドsupportedMethods
- 実際にサポートされている HTTP メソッドmsg
- 詳細メッセージ
メソッドの詳細
getMethod
失敗の原因となった HTTP リクエストメソッドを返します。getSupportedMethods
実際にサポートされている HTTP メソッド、または不明な場合はnull
を返します。getSupportedHttpMethods
実際にサポートされている HTTP メソッドをHttpMethod
インスタンス、または不明の場合はnull
として返します。- 導入:
- 3.2
getStatusCode
インターフェースからコピーされた説明:ErrorResponse
レスポンスに使用する HTTP ステータスコードを返します。- 次で指定:
- インターフェース
ErrorResponse
のgetStatusCode
getHeaders
インターフェースからコピーされた説明:ErrorResponse
レスポンスに使用するヘッダーを返します。- 次で指定:
- インターフェース
ErrorResponse
のgetHeaders
getBody
インターフェースからコピーされた説明:ErrorResponse
レスポンスの本文を返します。RFC 7807ProblemDetail
としてフォーマットされ、status
はレスポンスステータスと一致する必要があります。- 次で指定:
- インターフェース
ErrorResponse
のgetBody
getDetailMessageArguments
インターフェースからコピーされた説明:ErrorResponse
MessageSource
を介してこの例外の問題の「詳細」を解決するためにmessage code
と共に使用する引数を返します。引数は、メッセージ値のプレースホルダーに展開されます。「無効なコンテンツ型 {0}」です。- 次で指定:
- インターフェース
ErrorResponse
のgetDetailMessageArguments
HttpRequestMethodNotSupportedException(String, Collection)
を推奨