クラス HttpStatusAccessDeniedHandler
java.lang.ObjectSE
org.springframework.security.web.access.HttpStatusAccessDeniedHandler
- 実装されているすべてのインターフェース:
AccessDeniedHandler
レスポンスとして
HttpStatus を送信する AccessDeniedHandler。- 導入:
- 6.5
コンストラクターの概要
コンストラクターコンストラクター説明HttpStatusAccessDeniedHandler(org.springframework.http.HttpStatus httpStatus) 新しいインスタンスを作成します。メソッドのサマリー
修飾子と型メソッド説明voidhandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AccessDeniedException accessDeniedException) アクセス拒否エラーを処理します。
コンストラクターの詳細
HttpStatusAccessDeniedHandler
public HttpStatusAccessDeniedHandler(org.springframework.http.HttpStatus httpStatus) 新しいインスタンスを作成します。- パラメーター:
httpStatus- 設定する HttpStatus
メソッドの詳細
handle
public void handle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOExceptionSE, jakarta.servlet.ServletException インターフェースからコピーされた説明:AccessDeniedHandlerアクセス拒否エラーを処理します。- 次で指定:
- インターフェース
AccessDeniedHandlerのhandle - パラメーター:
request-AccessDeniedExceptionが発生したリクエストresponse- ユーザーエージェントに障害を通知できるようにするためaccessDeniedException- 呼び出しの原因となった例外- 例外:
IOExceptionSE- IOException が発生した場合jakarta.servlet.ServletException- ServletException の場合