先看完,再總結
三個核心概念:
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,用於調度路由以及渲染視圖。