接口的使用
org.springframework.web.context.request.WebRequest
使用WebRequest的程序包 程序包 说明 org.springframework.orm.hibernate5.support Classes supporting theorg.springframework.orm.hibernate5package.org.springframework.orm.jpa.support Classes supporting theorg.springframework.orm.jpapackage.org.springframework.web.bind.support Support classes for web data binding.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.method.annotation Support classes for annotation-based handler method processing.org.springframework.web.servlet.handler Provides standard HandlerMapping implementations, including abstract base classes for custom implementations.org.springframework.web.servlet.mvc.method.annotation MVC infrastructure for annotation-based handler method processing, building on theorg.springframework.web.method.annotationpackage.org.springframework.orm.hibernate5.support中WebRequest的使用
参数类型为WebRequest的org.springframework.orm.hibernate5.support中的方法 修饰符和类型 方法 说明 voidOpenSessionInViewInterceptor. afterCompletion(WebRequest request, Exception ex)Unbind the HibernateSessionfrom the thread and close it).voidOpenSessionInViewInterceptor. afterConcurrentHandlingStarted(WebRequest request)voidOpenSessionInViewInterceptor. postHandle(WebRequest request, ModelMap model)voidOpenSessionInViewInterceptor. preHandle(WebRequest request)Open a new HibernateSessionaccording and bind it to the thread via theTransactionSynchronizationManager.org.springframework.orm.jpa.support中WebRequest的使用
参数类型为WebRequest的org.springframework.orm.jpa.support中的方法 修饰符和类型 方法 说明 voidOpenEntityManagerInViewInterceptor. afterCompletion(WebRequest request, Exception ex)voidOpenEntityManagerInViewInterceptor. afterConcurrentHandlingStarted(WebRequest request)voidOpenEntityManagerInViewInterceptor. postHandle(WebRequest request, ModelMap model)voidOpenEntityManagerInViewInterceptor. preHandle(WebRequest request)org.springframework.web.bind.support中WebRequest的使用
参数类型为WebRequest的org.springframework.web.bind.support中的方法 修饰符和类型 方法 说明 voidWebRequestDataBinder. bind(WebRequest request)Bind the parameters of the given request to this binder's target, also binding multipart files in case of a multipart request.voidDefaultSessionAttributeStore. cleanupAttribute(WebRequest request, String attributeName)voidSessionAttributeStore. cleanupAttribute(WebRequest request, String attributeName)Clean up the specified attribute in the backend session.protected StringDefaultSessionAttributeStore. getAttributeNameInSession(WebRequest request, String attributeName)Calculate the attribute name in the backend session.default voidWebBindingInitializer. initBinder(WebDataBinder binder, WebRequest request)已过时。as of 5.0 in favor ofWebBindingInitializer.initBinder(WebDataBinder)ObjectDefaultSessionAttributeStore. retrieveAttribute(WebRequest request, String attributeName)ObjectSessionAttributeStore. retrieveAttribute(WebRequest request, String attributeName)Retrieve the specified attribute from the backend session.voidDefaultSessionAttributeStore. storeAttribute(WebRequest request, String attributeName, Object attributeValue)voidSessionAttributeStore. storeAttribute(WebRequest request, String attributeName, Object attributeValue)Store the supplied attribute in the backend session.org.springframework.web.context.request中WebRequest的使用
org.springframework.web.context.request中WebRequest的子接口 修饰符和类型 接口 说明 interfaceNativeWebRequestExtension of theWebRequestinterface, exposing the native request and response objects in a generic fashion.实现WebRequest的org.springframework.web.context.request中的类 修饰符和类型 类 说明 classFacesWebRequestWebRequestadapter for a JSFFacesContext.classServletWebRequestWebRequestadapter for anHttpServletRequest.参数类型为WebRequest的org.springframework.web.context.request中的方法 修饰符和类型 方法 说明 voidWebRequestInterceptor. afterCompletion(WebRequest request, Exception ex)Callback after completion of request processing, that is, after rendering the view.voidAsyncWebRequestInterceptor. afterConcurrentHandlingStarted(WebRequest request)Called instead ofpostHandleandafterCompletion, when the handler started handling the request concurrently.voidWebRequestInterceptor. postHandle(WebRequest request, ModelMap model)Intercept the execution of a request handler after its successful invocation, right before view rendering (if any).voidWebRequestInterceptor. preHandle(WebRequest request)Intercept the execution of a request handler before its invocation.org.springframework.web.context.request.async中WebRequest的使用
org.springframework.web.context.request.async中WebRequest的子接口 修饰符和类型 接口 说明 interfaceAsyncWebRequestExtendsNativeWebRequestwith methods for asynchronous request processing.实现WebRequest的org.springframework.web.context.request.async中的类 修饰符和类型 类 说明 classStandardServletAsyncWebRequestA Servlet 3.0 implementation ofAsyncWebRequest.参数类型为WebRequest的org.springframework.web.context.request.async中的方法 修饰符和类型 方法 说明 static WebAsyncManagerWebAsyncUtils. getAsyncManager(WebRequest webRequest)Obtain theWebAsyncManagerfor the current request, or if not found, create and associate it with the request.org.springframework.web.method.annotation中WebRequest的使用
参数类型为WebRequest的org.springframework.web.method.annotation中的方法 修饰符和类型 方法 说明 voidSessionAttributesHandler. cleanupAttributes(WebRequest request)Remove "known" attributes from the session, i.e. attributes listed by name in@SessionAttributesor attributes previously stored in the model that matched by type.Map<String,Object>SessionAttributesHandler. retrieveAttributes(WebRequest request)Retrieve "known" attributes from the session, i.e. attributes listed by name in@SessionAttributesor attributes previously stored in the model that matched by type.voidSessionAttributesHandler. storeAttributes(WebRequest request, Map<String,?> attributes)Store a subset of the given attributes in the session.org.springframework.web.servlet.handler中WebRequest的使用
实现WebRequest的org.springframework.web.servlet.handler中的类 修饰符和类型 类 说明 classDispatcherServletWebRequestServletWebRequestsubclass that is aware ofDispatcherServlet's request context, such as the Locale determined by the configuredLocaleResolver.org.springframework.web.servlet.mvc.method.annotation中WebRequest的使用
参数类型为WebRequest的org.springframework.web.servlet.mvc.method.annotation中的方法 修饰符和类型 方法 说明 protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleAsyncRequestTimeoutException(AsyncRequestTimeoutException ex, HttpHeaders headers, HttpStatus status, WebRequest webRequest)Customize the response for AsyncRequestTimeoutException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleBindException(BindException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for BindException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleConversionNotSupported(ConversionNotSupportedException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for ConversionNotSupportedException.ResponseEntity<Object>ResponseEntityExceptionHandler. handleException(Exception ex, WebRequest request)Provides handling for standard Spring MVC exceptions.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleExceptionInternal(Exception ex, Object body, HttpHeaders headers, HttpStatus status, WebRequest request)A single place to customize the response body of all exception types.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleHttpMediaTypeNotAcceptable(HttpMediaTypeNotAcceptableException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for HttpMediaTypeNotAcceptableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupportedException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for HttpMediaTypeNotSupportedException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleHttpMessageNotReadable(HttpMessageNotReadableException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for HttpMessageNotReadableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleHttpMessageNotWritable(HttpMessageNotWritableException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for HttpMessageNotWritableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for HttpRequestMethodNotSupportedException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for MethodArgumentNotValidException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleMissingPathVariable(MissingPathVariableException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for MissingPathVariableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleMissingServletRequestParameter(MissingServletRequestParameterException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for MissingServletRequestParameterException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleMissingServletRequestPart(MissingServletRequestPartException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for MissingServletRequestPartException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleNoHandlerFoundException(NoHandlerFoundException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for NoHandlerFoundException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleServletRequestBindingException(ServletRequestBindingException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for ServletRequestBindingException.protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleTypeMismatch(TypeMismatchException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for TypeMismatchException.