类的使用
org.springframework.http.HttpStatus
使用HttpStatus的程序包 程序包 说明 org.springframework.http Contains a basic abstraction over client/server-side HTTP.org.springframework.http.client Contains an abstraction over client-side HTTP.org.springframework.http.client.reactive Abstractions for reactive HTTP client support includingClientHttpRequestandClientHttpResponseas well as aClientHttpConnector.org.springframework.http.server Contains an abstraction over server-side HTTP.org.springframework.http.server.reactive Abstractions for reactive HTTP server support including aServerHttpRequestandServerHttpResponsealong with anHttpHandlerfor processing.org.springframework.mock.http.client Mock implementations of client-side HTTP abstractions.org.springframework.mock.http.client.reactive Mock implementations of reactive HTTP client contracts.org.springframework.test.web.client.response Contains built-inResponseCreatorimplementations.org.springframework.test.web.reactive.server Support for testing Spring WebFlux server endpoints viaWebTestClient.org.springframework.web.bind.annotation Annotations for binding requests to controllers and handler methods as well as for binding request parameters to method arguments.org.springframework.web.client Core package of the client-side web support.org.springframework.web.filter Provides generic filter base classes allowing for bean-style configuration.org.springframework.web.method Common infrastructure for handler method processing, as used by Spring MVC'sorg.springframework.web.servlet.mvc.methodpackage.org.springframework.web.method.support Generic support classes for handler method processing.org.springframework.web.reactive.function.client Provides a reactiveWebClientthat builds on top of theorg.springframework.http.client.reactivereactive HTTP adapter layer.org.springframework.web.reactive.function.client.support Classes supporting theorg.springframework.web.reactive.function.clientpackage.org.springframework.web.reactive.function.server Provides the types that make up Spring's functional web framework for Reactive environments.org.springframework.web.reactive.handler Provides HandlerMapping implementations including abstract base classes.org.springframework.web.reactive.result.view Support for result handling through view resolution.org.springframework.web.server Core interfaces and classes for Spring's generic, reactive web support.org.springframework.web.server.handler Provides common WebHandler implementations and aWebHandlerDecorator.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.config.annotation Annotation-based setup for Spring MVC.org.springframework.web.servlet.function Provides the types that make up Spring's functional web framework for Servlet environments.org.springframework.web.servlet.mvc Standard controller implementations for the Servlet MVC framework that comes with Spring.org.springframework.web.servlet.mvc.method.annotation MVC infrastructure for annotation-based handler method processing, building on theorg.springframework.web.method.annotationpackage.org.springframework.web.servlet.view Provides standard View and ViewResolver implementations, including abstract base classes for custom implementations.org.springframework.web.socket.sockjs.transport.handler TransportHandlerimplementation classes as well as a concreteSockJsService.org.springframework.http中HttpStatus的使用
返回HttpStatus的org.springframework.http中的方法 修饰符和类型 方法 说明 HttpStatusResponseEntity. getStatusCode()Return the HTTP status code of the response.static HttpStatusHttpStatus. resolve(int statusCode)Resolve the given status code to anHttpStatus, if possible.static HttpStatusHttpStatus. valueOf(int statusCode)Return the enum constant of this type with the specified numeric value.static HttpStatusHttpStatus. valueOf(String name)返回带有指定名称的该类型的枚举常量。static HttpStatus[]HttpStatus. values()按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。参数类型为HttpStatus的org.springframework.http中的方法 修饰符和类型 方法 说明 static ResponseEntity.BodyBuilderResponseEntity. status(HttpStatus status)Create a builder with the given status.static HttpStatus.SeriesHttpStatus.Series. valueOf(HttpStatus status)Return the enum constant of this type with the corresponding series.参数类型为HttpStatus的org.springframework.http中的构造器 构造器 说明 ResponseEntity(HttpStatus status)Create a newResponseEntitywith the given status code, and no body nor headers.ResponseEntity(MultiValueMap<String,String> headers, HttpStatus status)Create a newHttpEntitywith the given headers and status code, and no body.ResponseEntity(T body, HttpStatus status)Create a newResponseEntitywith the given body and status code, and no headers.ResponseEntity(T body, MultiValueMap<String,String> headers, HttpStatus status)Create a newHttpEntitywith the given body, headers, and status code.org.springframework.http.client中HttpStatus的使用
返回HttpStatus的org.springframework.http.client中的方法 修饰符和类型 方法 说明 HttpStatusAbstractClientHttpResponse. getStatusCode()HttpStatusClientHttpResponse. getStatusCode()Get the HTTP status code as anHttpStatusenum value.org.springframework.http.client.reactive中HttpStatus的使用
返回HttpStatus的org.springframework.http.client.reactive中的方法 修饰符和类型 方法 说明 HttpStatusClientHttpResponse. getStatusCode()Return the HTTP status code as anHttpStatusenum value.HttpStatusClientHttpResponseDecorator. getStatusCode()org.springframework.http.server中HttpStatus的使用
参数类型为HttpStatus的org.springframework.http.server中的方法 修饰符和类型 方法 说明 voidServerHttpResponse. setStatusCode(HttpStatus status)Set the HTTP status code of the response.voidServletServerHttpResponse. setStatusCode(HttpStatus status)org.springframework.http.server.reactive中HttpStatus的使用
返回HttpStatus的org.springframework.http.server.reactive中的方法 修饰符和类型 方法 说明 HttpStatusAbstractServerHttpResponse. getStatusCode()HttpStatusServerHttpResponse. getStatusCode()Return the status code that has been set, or otherwise fall back on the status of the response from the underlying server.HttpStatusServerHttpResponseDecorator. getStatusCode()参数类型为HttpStatus的org.springframework.http.server.reactive中的方法 修饰符和类型 方法 说明 booleanAbstractServerHttpResponse. setStatusCode(HttpStatus status)booleanServerHttpResponse. setStatusCode(HttpStatus status)Set the HTTP status code of the response.booleanServerHttpResponseDecorator. setStatusCode(HttpStatus status)org.springframework.mock.http.client中HttpStatus的使用
返回HttpStatus的org.springframework.mock.http.client中的方法 修饰符和类型 方法 说明 HttpStatusMockClientHttpResponse. getStatusCode()参数类型为HttpStatus的org.springframework.mock.http.client中的构造器 构造器 说明 MockClientHttpResponse(byte[] body, HttpStatus statusCode)Constructor with response body as a byte array.MockClientHttpResponse(InputStream body, HttpStatus statusCode)Constructor with response body as InputStream.org.springframework.mock.http.client.reactive中HttpStatus的使用
返回HttpStatus的org.springframework.mock.http.client.reactive中的方法 修饰符和类型 方法 说明 HttpStatusMockClientHttpResponse. getStatusCode()参数类型为HttpStatus的org.springframework.mock.http.client.reactive中的构造器 构造器 说明 MockClientHttpResponse(HttpStatus status)org.springframework.test.web.client.response中HttpStatus的使用
参数类型为HttpStatus的org.springframework.test.web.client.response中的方法 修饰符和类型 方法 说明 static DefaultResponseCreatorMockRestResponseCreators. withStatus(HttpStatus status)ResponseCreatorwith a specific HTTP status.参数类型为HttpStatus的org.springframework.test.web.client.response中的构造器 构造器 说明 DefaultResponseCreator(HttpStatus statusCode)Protected constructor.org.springframework.test.web.reactive.server中HttpStatus的使用
返回HttpStatus的org.springframework.test.web.reactive.server中的方法 修饰符和类型 方法 说明 HttpStatusExchangeResult. getStatus()Return the HTTP status code as anHttpStatusenum value.参数类型为HttpStatus的org.springframework.test.web.reactive.server中的方法 修饰符和类型 方法 说明 WebTestClient.ResponseSpecStatusAssertions. isEqualTo(HttpStatus status)Assert the response status as anHttpStatus.org.springframework.web.bind.annotation中HttpStatus的使用
返回HttpStatus的org.springframework.web.bind.annotation中的方法 修饰符和类型 方法 说明 HttpStatuscode()The status code to use for the response.HttpStatusvalue()Alias forResponseStatus.code().org.springframework.web.client中HttpStatus的使用
返回HttpStatus的org.springframework.web.client中的方法 修饰符和类型 方法 说明 protected HttpStatusDefaultResponseErrorHandler. getHttpStatusCode(ClientHttpResponse response)已过时。as of 5.0, in favor ofDefaultResponseErrorHandler.handleError(ClientHttpResponse, HttpStatus)HttpStatusHttpStatusCodeException. getStatusCode()Return the HTTP status code.参数类型为HttpStatus的org.springframework.web.client中的方法 修饰符和类型 方法 说明 static HttpClientErrorExceptionHttpClientErrorException. create(String message, HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)Variant ofHttpClientErrorException.create(HttpStatus, String, HttpHeaders, byte[], Charset)with an optional prepared message.static HttpClientErrorExceptionHttpClientErrorException. create(HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)CreateHttpClientErrorExceptionor an HTTP status specific sub-class.static HttpServerErrorExceptionHttpServerErrorException. create(String message, HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)Variant ofHttpServerErrorException.create(String, HttpStatus, String, HttpHeaders, byte[], Charset)with an optional prepared message.static HttpServerErrorExceptionHttpServerErrorException. create(HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)Create anHttpServerErrorExceptionor an HTTP status specific sub-class.protected voidDefaultResponseErrorHandler. handleError(ClientHttpResponse response, HttpStatus statusCode)Handle the error based on the resolved status code.voidExtractingResponseErrorHandler. handleError(ClientHttpResponse response, HttpStatus statusCode)protected booleanDefaultResponseErrorHandler. hasError(HttpStatus statusCode)Template method called fromDefaultResponseErrorHandler.hasError(ClientHttpResponse).protected booleanExtractingResponseErrorHandler. hasError(HttpStatus statusCode)类型变量类型为HttpStatus的org.springframework.web.client中的方法参数 修饰符和类型 方法 说明 voidExtractingResponseErrorHandler. setStatusMapping(Map<HttpStatus,Class<? extends RestClientException>> statusMapping)Set the mapping from HTTP status code toRestClientExceptionsubclass.参数类型为HttpStatus的org.springframework.web.client中的构造器 构造器 说明 HttpClientErrorException(String message, HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset responseCharset)Constructor with a status code and status text, headers, and content, and an prepared message.HttpClientErrorException(HttpStatus statusCode)Constructor with a status code only.HttpClientErrorException(HttpStatus statusCode, String statusText)Constructor with a status code and status text.HttpClientErrorException(HttpStatus statusCode, String statusText, byte[] body, Charset responseCharset)Constructor with a status code and status text, and content.HttpClientErrorException(HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset responseCharset)Constructor with a status code and status text, headers, and content.HttpServerErrorException(String message, HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)Constructor with a status code and status text, headers, content, and an prepared message.HttpServerErrorException(HttpStatus statusCode)Constructor with a status code only.HttpServerErrorException(HttpStatus statusCode, String statusText)Constructor with a status code and status text.HttpServerErrorException(HttpStatus statusCode, String statusText, byte[] body, Charset charset)Constructor with a status code and status text, and content.HttpServerErrorException(HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)Constructor with a status code and status text, headers, and content.HttpStatusCodeException(String message, HttpStatus statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)Construct instance with anHttpStatus, status text, content, and a response charset.HttpStatusCodeException(HttpStatus statusCode)Construct a new instance with anHttpStatus.HttpStatusCodeException(HttpStatus statusCode, String statusText)Construct a new instance with anHttpStatusand status text.HttpStatusCodeException(HttpStatus statusCode, String statusText, byte[] responseBody, Charset responseCharset)Construct instance with anHttpStatus, status text, and content.HttpStatusCodeException(HttpStatus statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)Construct instance with anHttpStatus, status text, content, and a response charset.org.springframework.web.filter中HttpStatus的使用
返回HttpStatus的org.springframework.web.filter中的方法 修饰符和类型 方法 说明 HttpStatusRelativeRedirectFilter. getRedirectStatus()Return the configured redirect status.参数类型为HttpStatus的org.springframework.web.filter中的方法 修饰符和类型 方法 说明 voidRelativeRedirectFilter. setRedirectStatus(HttpStatus status)Set the default HTTP Status to use for redirects.org.springframework.web.method中HttpStatus的使用
返回HttpStatus的org.springframework.web.method中的方法 修饰符和类型 方法 说明 protected HttpStatusHandlerMethod. getResponseStatus()Return the specified response status, if any.org.springframework.web.method.support中HttpStatus的使用
返回HttpStatus的org.springframework.web.method.support中的方法 修饰符和类型 方法 说明 HttpStatusModelAndViewContainer. getStatus()Return the configured HTTP status, if any.参数类型为HttpStatus的org.springframework.web.method.support中的方法 修饰符和类型 方法 说明 voidModelAndViewContainer. setStatus(HttpStatus status)Provide an HTTP status that will be passed on to with theModelAndViewused for view rendering purposes.org.springframework.web.reactive.function.client中HttpStatus的使用
返回HttpStatus的org.springframework.web.reactive.function.client中的方法 修饰符和类型 方法 说明 HttpStatusWebClientResponseException. getStatusCode()Return the HTTP status code value.HttpStatusClientResponse. statusCode()Return the HTTP status code as anHttpStatusenum value.参数类型为HttpStatus的org.springframework.web.reactive.function.client中的方法 修饰符和类型 方法 说明 static ClientResponse.BuilderClientResponse. create(HttpStatus statusCode)Create a response builder with the given status code and using default strategies for reading the body.static ClientResponse.BuilderClientResponse. create(HttpStatus statusCode, List<HttpMessageReader<?>> messageReaders)Create a response builder with the given status code and message body readers.static ClientResponse.BuilderClientResponse. create(HttpStatus statusCode, ExchangeStrategies strategies)Create a response builder with the given status code and strategies for reading the body.ClientResponse.BuilderClientResponse.Builder. statusCode(HttpStatus statusCode)Set the status code of the response.类型变量类型为HttpStatus的org.springframework.web.reactive.function.client中的方法参数 修饰符和类型 方法 说明 WebClient.ResponseSpecWebClient.ResponseSpec. onStatus(Predicate<HttpStatus> statusPredicate, Function<ClientResponse,reactor.core.publisher.Mono<? extends Throwable>> exceptionFunction)Provide a function to map specific error status codes to an error signal to be propagated downstream instead of the response.static ExchangeFilterFunctionExchangeFilterFunctions. statusError(Predicate<HttpStatus> statusPredicate, Function<ClientResponse,? extends Throwable> exceptionFunction)Return a filter that generates an error signal when the givenHttpStatuspredicate matches.org.springframework.web.reactive.function.client.support中HttpStatus的使用
返回HttpStatus的org.springframework.web.reactive.function.client.support中的方法 修饰符和类型 方法 说明 HttpStatusClientResponseWrapper. statusCode()org.springframework.web.reactive.function.server中HttpStatus的使用
返回HttpStatus的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 HttpStatusServerResponse. statusCode()Return the status code of this response.参数类型为HttpStatus的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 EntityResponse.Builder<T>EntityResponse.Builder. status(HttpStatus status)Set the HTTP status.RenderingResponse.BuilderRenderingResponse.Builder. status(HttpStatus status)Set the HTTP status.static ServerResponse.BodyBuilderServerResponse. status(HttpStatus status)Create a builder with the given HTTP status.org.springframework.web.reactive.handler中HttpStatus的使用
返回HttpStatus的org.springframework.web.reactive.handler中的方法 修饰符和类型 方法 说明 protected HttpStatusWebFluxResponseStatusExceptionHandler. determineStatus(Throwable ex)org.springframework.web.reactive.result.view中HttpStatus的使用
返回HttpStatus的org.springframework.web.reactive.result.view中的方法 修饰符和类型 方法 说明 HttpStatusRedirectView. getStatusCode()Get the redirect status code to use.HttpStatusRendering. status()Return the HTTP status to set the response to.参数类型为HttpStatus的org.springframework.web.reactive.result.view中的方法 修饰符和类型 方法 说明 voidRedirectView. setStatusCode(HttpStatus statusCode)Set an alternate redirect status code such asTEMPORARY_REDIRECTorPERMANENT_REDIRECT.BRendering.Builder. status(HttpStatus status)Specify the status to use for the response.参数类型为HttpStatus的org.springframework.web.reactive.result.view中的构造器 构造器 说明 RedirectView(String redirectUrl, HttpStatus statusCode)Create a newRedirectViewwith the given URL and an alternate redirect status code such asTEMPORARY_REDIRECTorPERMANENT_REDIRECT.org.springframework.web.server中HttpStatus的使用
返回HttpStatus的org.springframework.web.server中的方法 修饰符和类型 方法 说明 HttpStatusResponseStatusException. getStatus()Return the HTTP status associated with this exception.参数类型为HttpStatus的org.springframework.web.server中的构造器 构造器 说明 ResponseStatusException(HttpStatus status)Constructor with a response status.ResponseStatusException(HttpStatus status, String reason)Constructor with a response status and a reason to add to the exception message as explanation.ResponseStatusException(HttpStatus status, String reason, Throwable cause)Constructor with a response status and a reason to add to the exception message as explanation, as well as a nested exception.org.springframework.web.server.handler中HttpStatus的使用
返回HttpStatus的org.springframework.web.server.handler中的方法 修饰符和类型 方法 说明 protected HttpStatusResponseStatusExceptionHandler. determineStatus(Throwable ex)Determine the HTTP status implied by the given exception.org.springframework.web.servlet中HttpStatus的使用
返回HttpStatus的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 HttpStatusModelAndView. getStatus()Return the configured HTTP status for the response, if any.参数类型为HttpStatus的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 voidModelAndView. setStatus(HttpStatus status)Set the HTTP status to use for the response.参数类型为HttpStatus的org.springframework.web.servlet中的构造器 构造器 说明 ModelAndView(String viewName, Map<String,?> model, HttpStatus status)Create a new ModelAndView given a view name, model, and HTTP status.ModelAndView(String viewName, HttpStatus status)Create a new ModelAndView given a view name and HTTP status.org.springframework.web.servlet.config.annotation中HttpStatus的使用
参数类型为HttpStatus的org.springframework.web.servlet.config.annotation中的方法 修饰符和类型 方法 说明 voidViewControllerRegistry. addStatusController(String urlPath, HttpStatus statusCode)Map a simple controller to the given URL path (or pattern) in order to set the response status to the given code without rendering a body.RedirectViewControllerRegistrationRedirectViewControllerRegistration. setStatusCode(HttpStatus statusCode)Set the specific redirect 3xx status code to use.ViewControllerRegistrationViewControllerRegistration. setStatusCode(HttpStatus statusCode)Set the status code to set on the response.org.springframework.web.servlet.function中HttpStatus的使用
返回HttpStatus的org.springframework.web.servlet.function中的方法 修饰符和类型 方法 说明 HttpStatusServerResponse. statusCode()Return the status code of this response.参数类型为HttpStatus的org.springframework.web.servlet.function中的方法 修饰符和类型 方法 说明 EntityResponse.Builder<T>EntityResponse.Builder. status(HttpStatus status)Set the HTTP status.RenderingResponse.BuilderRenderingResponse.Builder. status(HttpStatus status)Set the HTTP status.static ServerResponse.BodyBuilderServerResponse. status(HttpStatus status)Create a builder with the given HTTP status.org.springframework.web.servlet.mvc中HttpStatus的使用
返回HttpStatus的org.springframework.web.servlet.mvc中的方法 修饰符和类型 方法 说明 HttpStatusParameterizableViewController. getStatusCode()Return the configured HTTP status code ornull.参数类型为HttpStatus的org.springframework.web.servlet.mvc中的方法 修饰符和类型 方法 说明 voidParameterizableViewController. setStatusCode(HttpStatus statusCode)Configure the HTTP status code that this controller should set on the response.org.springframework.web.servlet.mvc.method.annotation中HttpStatus的使用
参数类型为HttpStatus的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.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.org.springframework.web.servlet.view中HttpStatus的使用
返回HttpStatus的org.springframework.web.servlet.view中的方法 修饰符和类型 方法 说明 protected HttpStatusRedirectView. getHttp11StatusCode(HttpServletRequest request, HttpServletResponse response, String targetUrl)Determines the status code to use for HTTP 1.1 compatible requests.参数类型为HttpStatus的org.springframework.web.servlet.view中的方法 修饰符和类型 方法 说明 voidRedirectView. setStatusCode(HttpStatus statusCode)Set the status code for this view.org.springframework.web.socket.sockjs.transport.handler中HttpStatus的使用
返回HttpStatus的org.springframework.web.socket.sockjs.transport.handler中的方法 修饰符和类型 方法 说明 protected abstract HttpStatusAbstractHttpReceivingTransportHandler. getResponseStatus()protected HttpStatusXhrReceivingTransportHandler. getResponseStatus()