类 DispatcherServletWebRequest
- java.lang.Object
- org.springframework.web.context.request.AbstractRequestAttributes
- org.springframework.web.context.request.ServletRequestAttributes
- org.springframework.web.context.request.ServletWebRequest
- org.springframework.web.servlet.handler.DispatcherServletWebRequest
- 所有已实现的接口:
NativeWebRequest
,RequestAttributes
,WebRequest
public class DispatcherServletWebRequest extends ServletWebRequest
ServletWebRequest
subclass that is aware ofDispatcherServlet
's request context, such as the Locale determined by the configuredLocaleResolver
.- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller
- 另请参阅:
getLocale()
,LocaleResolver
字段概要
从类继承的字段 org.springframework.web.context.request.ServletRequestAttributes
DESTRUCTION_CALLBACK_NAME_PREFIX, immutableValueTypes
从类继承的字段 org.springframework.web.context.request.AbstractRequestAttributes
requestDestructionCallbacks
从接口继承的字段 org.springframework.web.context.request.RequestAttributes
REFERENCE_REQUEST, REFERENCE_SESSION, SCOPE_GLOBAL_SESSION, SCOPE_REQUEST, SCOPE_SESSION
构造器概要
构造器 构造器 说明 DispatcherServletWebRequest(HttpServletRequest request)
Create a new DispatcherServletWebRequest instance for the given request.DispatcherServletWebRequest(HttpServletRequest request, HttpServletResponse response)
Create a new DispatcherServletWebRequest instance for the given request and response.
方法概要
从类继承的方法 org.springframework.web.context.request.ServletWebRequest
checkNotModified, checkNotModified, checkNotModified, getContextPath, getDescription, getHeader, getHeaderNames, getHeaderValues, getHttpMethod, getNativeRequest, getNativeRequest, getNativeResponse, getNativeResponse, getParameter, getParameterMap, getParameterNames, getParameterValues, getRemoteUser, getUserPrincipal, isNotModified, isSecure, isUserInRole, toString
从类继承的方法 org.springframework.web.context.request.ServletRequestAttributes
getAttribute, getAttributeNames, getRequest, getResponse, getSession, getSessionId, getSessionMutex, isImmutableSessionAttribute, registerDestructionCallback, registerSessionDestructionCallback, removeAttribute, resolveReference, setAttribute, updateAccessedSessionAttributes
从类继承的方法 org.springframework.web.context.request.AbstractRequestAttributes
isRequestActive, registerRequestDestructionCallback, removeRequestDestructionCallback, requestCompleted
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 org.springframework.web.context.request.RequestAttributes
getAttribute, getAttributeNames, getSessionId, getSessionMutex, registerDestructionCallback, removeAttribute, resolveReference, setAttribute
构造器详细资料
DispatcherServletWebRequest
public DispatcherServletWebRequest(HttpServletRequest request)
Create a new DispatcherServletWebRequest instance for the given request.- 参数:
request
- current HTTP request
DispatcherServletWebRequest
public DispatcherServletWebRequest(HttpServletRequest request, HttpServletResponse response)
Create a new DispatcherServletWebRequest instance for the given request and response.- 参数:
request
- current HTTP requestresponse
- current HTTP response
方法详细资料
getLocale
public Locale getLocale()
从接口复制的说明:WebRequest
Return the primary Locale for this request.- 指定者:
getLocale
在接口中WebRequest
- 覆盖:
getLocale
在类中ServletWebRequest
- 另请参阅:
ServletRequest.getLocale()