类 RequestScope
- java.lang.Object
- org.springframework.web.context.request.AbstractRequestAttributesScope
- org.springframework.web.context.request.RequestScope
- 所有已实现的接口:
Scope
public class RequestScope extends AbstractRequestAttributesScope
Request-backedScope
implementation.Relies on a thread-bound
RequestAttributes
instance, which can be exported throughRequestContextListener
,RequestContextFilter
orDispatcherServlet
.This
Scope
will also work for Portlet environments, through an alternateRequestAttributes
implementation (as exposed out-of-the-box by Spring'sDispatcherPortlet
.- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Juergen Hoeller, Rob Harrop
- 另请参阅:
RequestContextHolder.currentRequestAttributes()
,RequestAttributes.SCOPE_REQUEST
,RequestContextListener
,RequestContextFilter
,DispatcherServlet
,DispatcherPortlet
构造器概要
构造器 构造器 说明 RequestScope()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getConversationId()
There is no conversation id concept for a request, so this method returnsnull
.protected int
getScope()
Template method that determines the actual target scope.从类继承的方法 org.springframework.web.context.request.AbstractRequestAttributesScope
get, registerDestructionCallback, remove, resolveContextualObject
构造器详细资料
RequestScope
public RequestScope()
方法详细资料
getScope
protected int getScope()
从类复制的说明:AbstractRequestAttributesScope
Template method that determines the actual target scope.- 指定者:
getScope
在类中AbstractRequestAttributesScope
- 返回:
- the target scope, in the form of an appropriate
RequestAttributes
constant - 另请参阅:
RequestAttributes.SCOPE_REQUEST
,RequestAttributes.SCOPE_SESSION
,RequestAttributes.SCOPE_GLOBAL_SESSION
getConversationId
public String getConversationId()
There is no conversation id concept for a request, so this method returnsnull
.- 返回:
- the conversation ID, or
null
if there is no conversation ID for the current scope