接口 HttpHandler
public interface HttpHandler
Lowest level contract for reactive HTTP request handling that serves as a common denominator across different runtimes.Higher-level, but still generic, building blocks for applications such as
WebFilter
,WebSession
,ServerWebExchange
, and others are available in theorg.springframework.web.server
package.Application level programming models such as annotated controllers and functional handlers are available in the
spring-webflux
module.Typically an
HttpHandler
represents an entire application with higher-level programming models bridged viaWebHttpHandlerBuilder
. Multiple applications at unique context paths can be plugged in with the help of theContextPathCompositeHandler
.- 从以下版本开始:
- 5.0
- 作者:
- Arjen Poutsma, Rossen Stoyanchev
- 另请参阅:
ContextPathCompositeHandler
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<Void>
handle(ServerHttpRequest request, ServerHttpResponse response)
Handle the given request and write to the response.
方法详细资料
handle
reactor.core.publisher.Mono<Void> handle(ServerHttpRequest request, ServerHttpResponse response)
Handle the given request and write to the response.- 参数:
request
- current requestresponse
- current response- 返回:
- indicates completion of request handling