クラス ContextExposingHttpServletRequest
java.lang.ObjectSE
jakarta.servlet.ServletRequestWrapper
jakarta.servlet.http.HttpServletRequestWrapper
org.springframework.web.context.support.ContextExposingHttpServletRequest
- 実装されているすべてのインターフェース:
jakarta.servlet.http.HttpServletRequest, jakarta.servlet.ServletRequest
public class ContextExposingHttpServletRequest
extends jakarta.servlet.http.HttpServletRequestWrapper
特定の WebApplicationContext 内のすべての Spring Bean をリクエスト属性としてアクセス可能にする HttpServletRequest デコレーター。属性がアクセスされると遅延チェックが行われます。
- 導入:
- 2.5
- 作成者:
- Juergen Hoeller
フィールドのサマリー
インターフェース jakarta.servlet.http.HttpServletRequest から継承されたフィールド
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTHコンストラクターの概要
コンストラクターコンストラクター説明ContextExposingHttpServletRequest(jakarta.servlet.http.HttpServletRequest originalRequest, WebApplicationContext context) 指定されたリクエストに対して新しい ContextExposingHttpServletRequest を作成します。ContextExposingHttpServletRequest(jakarta.servlet.http.HttpServletRequest originalRequest, WebApplicationContext context, @Nullable SetSE<StringSE> exposedContextBeanNames) 指定されたリクエストに対して新しい ContextExposingHttpServletRequest を作成します。メソッドのサマリー
修飾子と型メソッド説明getAttribute(StringSE name) final WebApplicationContextこのリクエストが実行される WebApplicationContext を返します。voidsetAttribute(StringSE name, ObjectSE value) クラス jakarta.servlet.http.HttpServletRequestWrapper から継承されたメソッド
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgradeクラス jakarta.servlet.ServletRequestWrapper から継承されたメソッド
getAsyncContext, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getProtocolRequestId, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setCharacterEncoding, setCharacterEncoding, setRequest, startAsync, startAsyncクラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース jakarta.servlet.ServletRequest から継承されたメソッド
getAsyncContext, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getProtocolRequestId, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setCharacterEncoding, setCharacterEncoding, startAsync, startAsync
コンストラクターの詳細
ContextExposingHttpServletRequest
public ContextExposingHttpServletRequest(jakarta.servlet.http.HttpServletRequest originalRequest, WebApplicationContext context) 指定されたリクエストに対して新しい ContextExposingHttpServletRequest を作成します。- パラメーター:
originalRequest- オリジナルの HttpServletRequestcontext- このリクエストが実行される WebApplicationContext
ContextExposingHttpServletRequest
public ContextExposingHttpServletRequest(jakarta.servlet.http.HttpServletRequest originalRequest, WebApplicationContext context, @Nullable SetSE<StringSE> exposedContextBeanNames) 指定されたリクエストに対して新しい ContextExposingHttpServletRequest を作成します。- パラメーター:
originalRequest- オリジナルの HttpServletRequestcontext- このリクエストが実行される WebApplicationContextexposedContextBeanNames- 公開されるはずのコンテキスト内の Bean の名前 (これが null 以外の場合、このセットの Bean のみが属性として公開の対象になります)
メソッドの詳細
getWebApplicationContext
このリクエストが実行される WebApplicationContext を返します。getAttribute
setAttribute