接口的使用
org.springframework.web.context.request.RequestAttributes
使用RequestAttributes的程序包 程序包 说明 org.springframework.web.context.request Support for generic request context holding, in particular for scoping of application objects per HTTP request or HTTP session.org.springframework.web.context.request.async Support for asynchronous request processing.org.springframework.web.servlet Provides servlets that integrate with the application context infrastructure, and the core interfaces and classes for the Spring web MVC framework.org.springframework.web.servlet.handler Provides standard HandlerMapping implementations, including abstract base classes for custom implementations.org.springframework.web.context.request中RequestAttributes的使用
org.springframework.web.context.request中RequestAttributes的子接口 修饰符和类型 接口 说明 interfaceNativeWebRequestExtension of theWebRequestinterface, exposing the native request and response objects in a generic fashion.interfaceWebRequestGeneric interface for a web request.实现RequestAttributes的org.springframework.web.context.request中的类 修饰符和类型 类 说明 classAbstractRequestAttributesAbstract support class for RequestAttributes implementations, offering a request completion mechanism for request-specific destruction callbacks and for updating accessed session attributes.classFacesRequestAttributesRequestAttributesadapter for a JSFFacesContext.classFacesWebRequestWebRequestadapter for a JSFFacesContext.classServletRequestAttributesServlet-based implementation of theRequestAttributesinterface.classServletWebRequestWebRequestadapter for anHttpServletRequest.返回RequestAttributes的org.springframework.web.context.request中的方法 修饰符和类型 方法 说明 static RequestAttributesRequestContextHolder. currentRequestAttributes()Return the RequestAttributes currently bound to the thread.static RequestAttributesRequestContextHolder. getRequestAttributes()Return the RequestAttributes currently bound to the thread.参数类型为RequestAttributes的org.springframework.web.context.request中的方法 修饰符和类型 方法 说明 static voidRequestContextHolder. setRequestAttributes(RequestAttributes attributes)Bind the given RequestAttributes to the current thread, not exposing it as inheritable for child threads.static voidRequestContextHolder. setRequestAttributes(RequestAttributes attributes, boolean inheritable)Bind the given RequestAttributes to the current thread.org.springframework.web.context.request.async中RequestAttributes的使用
org.springframework.web.context.request.async中RequestAttributes的子接口 修饰符和类型 接口 说明 interfaceAsyncWebRequestExtendsNativeWebRequestwith methods for asynchronous request processing.实现RequestAttributes的org.springframework.web.context.request.async中的类 修饰符和类型 类 说明 classStandardServletAsyncWebRequestA Servlet 3.0 implementation ofAsyncWebRequest.org.springframework.web.servlet中RequestAttributes的使用
参数类型为RequestAttributes的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 protected ServletRequestAttributesFrameworkServlet. buildRequestAttributes(HttpServletRequest request, HttpServletResponse response, RequestAttributes previousAttributes)Build ServletRequestAttributes for the given request (potentially also holding a reference to the response), taking pre-bound attributes (and their type) into consideration.org.springframework.web.servlet.handler中RequestAttributes的使用
实现RequestAttributes的org.springframework.web.servlet.handler中的类 修饰符和类型 类 说明 classDispatcherServletWebRequestServletWebRequestsubclass that is aware ofDispatcherServlet's request context, such as the Locale determined by the configuredLocaleResolver.