类 RequestScope
- java.lang.Object
- org.springframework.web.context.request.AbstractRequestAttributesScope
- org.springframework.web.context.request.RequestScope
- 所有已实现的接口:
Scope
public class RequestScope extends AbstractRequestAttributesScope
Request-backedScopeimplementation.Relies on a thread-bound
RequestAttributesinstance, which can be exported throughRequestContextListener,RequestContextFilterorDispatcherServlet.- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Juergen Hoeller, Rob Harrop
- 另请参阅:
RequestContextHolder.currentRequestAttributes(),RequestAttributes.SCOPE_REQUEST,RequestContextListener,RequestContextFilter,DispatcherServlet
构造器概要
构造器 构造器 说明 RequestScope()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetConversationId()There is no conversation id concept for a request, so this method returnsnull.protected intgetScope()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()
从类复制的说明:AbstractRequestAttributesScopeTemplate method that determines the actual target scope.- 指定者:
getScope在类中AbstractRequestAttributesScope- 返回:
- the target scope, in the form of an appropriate
RequestAttributesconstant - 另请参阅:
RequestAttributes.SCOPE_REQUEST,RequestAttributes.SCOPE_SESSION
getConversationId
@Nullable public String getConversationId()
There is no conversation id concept for a request, so this method returnsnull.- 返回:
- the conversation ID, or
nullif there is no conversation ID for the current scope