先看完,再总结
三个核心概念:
HttpHandler,WebHandler Api,WebClient
理解第二个概念:
Server name | Server API used | Reactive Streams support |
---|---|---|
Netty | Netty API | |
Undertow | Undertow API | spring-web: Undertow to Reactive Streams bridge |
Tomcat | Servlet 3.1 non-blocking I/O; Tomcat API to read and write ByteBuffers vs byte[] | spring-web: Servlet 3.1 non-blocking I/O to Reactive Streams bridge |
Jetty | Servlet 3.1 non-blocking I/O; Jetty API to write ByteBuffers vs byte[] | spring-web: Servlet 3.1 non-blocking I/O to Reactive Streams bridge |
Servlet 3.1 container | Servlet 3.1 non-blocking I/O | spring-web: Servlet 3.1 non-blocking I/O to Reactive Streams bridge |
根据下面这句话,WebHandler Api 是为了统一不同的 Server Api (servlet3.1 只是其中一个分支)
根据前端控制器模型,设计了一个集中的 WebHandler —— DispatcherHandler,用于调度路由以及渲染视图。