接口的使用
org.springframework.web.server.WebExceptionHandler
使用WebExceptionHandler的程序包 程序包 说明 org.springframework.web.reactive.config Spring WebFlux configuration infrastructure.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.server.adapter Implementations to adapt to the underlyingorg.springframework.http.client.reactive
reactive HTTP adapter andHttpHandler
.org.springframework.web.server.handler Provides common WebHandler implementations and aWebHandlerDecorator
.org.springframework.web.reactive.config中WebExceptionHandler的使用
返回WebExceptionHandler的org.springframework.web.reactive.config中的方法 修饰符和类型 方法 说明 WebExceptionHandler
WebFluxConfigurationSupport. responseStatusExceptionHandler()
org.springframework.web.reactive.function.server中WebExceptionHandler的使用
返回变量类型为WebExceptionHandler的类型的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 List<WebExceptionHandler>
HandlerStrategies. exceptionHandlers()
Return theWebExceptionHandlers
to be used for handling exceptions.参数类型为WebExceptionHandler的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 HandlerStrategies.Builder
HandlerStrategies.Builder. exceptionHandler(WebExceptionHandler exceptionHandler)
Add the given exception handler to this builder.org.springframework.web.reactive.handler中WebExceptionHandler的使用
实现WebExceptionHandler的org.springframework.web.reactive.handler中的类 修饰符和类型 类 说明 class
WebFluxResponseStatusExceptionHandler
Common WebFlux exception handler that detects instances ofResponseStatusException
(inherited from the base class) as well as exceptions annotated with@ResponseStatus
by determining the HTTP status for them and updating the status of the response accordingly.org.springframework.web.server.adapter中WebExceptionHandler的使用
参数类型为WebExceptionHandler的org.springframework.web.server.adapter中的方法 修饰符和类型 方法 说明 WebHttpHandlerBuilder
WebHttpHandlerBuilder. exceptionHandler(WebExceptionHandler... handlers)
Add the given exception handler(s).类型变量类型为WebExceptionHandler的org.springframework.web.server.adapter中的方法参数 修饰符和类型 方法 说明 WebHttpHandlerBuilder
WebHttpHandlerBuilder. exceptionHandlers(Consumer<List<WebExceptionHandler>> consumer)
Manipulate the "live" list of currently configured exception handlers.org.springframework.web.server.handler中WebExceptionHandler的使用
实现WebExceptionHandler的org.springframework.web.server.handler中的类 修饰符和类型 类 说明 class
ResponseStatusExceptionHandler
HandleResponseStatusException
by setting the response status.返回变量类型为WebExceptionHandler的类型的org.springframework.web.server.handler中的方法 修饰符和类型 方法 说明 List<WebExceptionHandler>
ExceptionHandlingWebHandler. getExceptionHandlers()
Return a read-only list of the configured exception handlers.类型变量类型为WebExceptionHandler的org.springframework.web.server.handler中的构造器参数 构造器 说明 ExceptionHandlingWebHandler(WebHandler delegate, List<WebExceptionHandler> handlers)
Create anExceptionHandlingWebHandler
for the given delegate.