🤗 ApiHug × {Postman|Swagger|Api...} = 快↑ 准√ 省↓
- GitHub - apihug/apihug.com: All abou the Apihug
- apihug.com: 有爱,有温度,有质量,有信任
- ApiHug - API design Copilot - IntelliJ IDEs Plugin | Marketplace
The Next Generation API Development Platform - ApiHug
Spring WebFlux, 建立在 Reactor-Netty 之上!
#核心依赖
- io.projectreactor:reactor-core 参考 Reactor
- spring-boot-starter-reactor-netty 参考 Reactor Netty
//spring-boot-starter-reactor-netty
dependencies {api("io.projectreactor.netty:reactor-netty-http")
}
核心项目
Spring-framework | Spring-webflux 源码open in new window; 这里包含所有响应式编程和spring MVC 整合, 她的依赖关系:
\--- org.springframework:spring-webflux:5.3.22+--- org.springframework:spring-beans:5.3.22 (*)+--- org.springframework:spring-core:5.3.22 (*)+--- org.springframework:spring-web:5.3.22 (*)\--- io.projectreactor:reactor-core:3.4.21 (*)
包结构
整个 spring-boot-starter-webflux
如下图:
\--- org.springframework.boot:spring-boot-starter-webflux -> 2.7.2+--- org.springframework.boot:spring-boot-starter:2.7.2 (*)+--- org.springframework.boot:spring-boot-starter-json:2.7.2| +--- org.springframework.boot:spring-boot-starter:2.7.2 (*)| +--- org.springframework:spring-web:5.3.22 (*)| +--- com.fasterxml.jackson.core:jackson-databind:2.13.3| | +--- com.fasterxml.jackson.core:jackson-annotations:2.13.3| | \--- com.fasterxml.jackson.core:jackson-core:2.13.3| +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.3| | +--- com.fasterxml.jackson.core:jackson-core:2.13.3| | \--- com.fasterxml.jackson.core:jackson-databind:2.13.3 (*)| +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.3| | +--- com.fasterxml.jackson.core:jackson-annotations:2.13.3| | +--- com.fasterxml.jackson.core:jackson-core:2.13.3| | \--- com.fasterxml.jackson.core:jackson-databind:2.13.3 (*)| \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.3| +--- com.fasterxml.jackson.core:jackson-core:2.13.3| \--- com.fasterxml.jackson.core:jackson-databind:2.13.3 (*)+--- org.springframework.boot:spring-boot-starter-reactor-netty:2.7.2| \--- io.projectreactor.netty:reactor-netty-http:1.0.21| +--- io.netty:netty-codec-http:4.1.79.Final| | +--- io.netty:netty-common:4.1.79.Final| | +--- io.netty:netty-buffer:4.1.79.Final| | | \--- io.netty:netty-common:4.1.79.Final| | +--- io.netty:netty-transport:4.1.79.Final| | | +--- io.netty:netty-common:4.1.79.Final| | | +--- io.netty:netty-buffer:4.1.79.Final (*)| | | \--- io.netty:netty-resolver:4.1.79.Final| | | \--- io.netty:netty-common:4.1.79.Final| | +--- io.netty:netty-codec:4.1.79.Final| | | +--- io.netty:netty-common:4.1.79.Final| | | +--- io.netty:netty-buffer:4.1.79.Final (*)| | | \--- io.netty:netty-transport:4.1.79.Final (*)| | \--- io.netty:netty-handler:4.1.79.Final| | +--- io.netty:netty-common:4.1.79.Final| | +--- io.netty:netty-resolver:4.1.79.Final (*)| | +--- io.netty:netty-buffer:4.1.79.Final (*)| | +--- io.netty:netty-transport:4.1.79.Final (*)| | +--- io.netty:netty-transport-native-unix-common:4.1.79.Final| | | +--- io.netty:netty-common:4.1.79.Final| | | +--- io.netty:netty-buffer:4.1.79.Final (*)| | | \--- io.netty:netty-transport:4.1.79.Final (*)| | \--- io.netty:netty-codec:4.1.79.Final (*)| +--- io.netty:netty-codec-http2:4.1.79.Final| | +--- io.netty:netty-common:4.1.79.Final| | +--- io.netty:netty-buffer:4.1.79.Final (*)| | +--- io.netty:netty-transport:4.1.79.Final (*)| | +--- io.netty:netty-codec:4.1.79.Final (*)| | +--- io.netty:netty-handler:4.1.79.Final (*)| | \--- io.netty:netty-codec-http:4.1.79.Final (*)| +--- io.netty:netty-resolver-dns:4.1.79.Final| | +--- io.netty:netty-common:4.1.79.Final| | +--- io.netty:netty-buffer:4.1.79.Final (*)| | +--- io.netty:netty-resolver:4.1.79.Final (*)| | +--- io.netty:netty-transport:4.1.79.Final (*)| | +--- io.netty:netty-codec:4.1.79.Final (*)| | +--- io.netty:netty-codec-dns:4.1.79.Final| | | +--- io.netty:netty-common:4.1.79.Final| | | +--- io.netty:netty-buffer:4.1.79.Final (*)| | | +--- io.netty:netty-transport:4.1.79.Final (*)| | | \--- io.netty:netty-codec:4.1.79.Final (*)| | \--- io.netty:netty-handler:4.1.79.Final (*)| +--- io.netty:netty-resolver-dns-native-macos:4.1.79.Final| | \--- io.netty:netty-resolver-dns-classes-macos:4.1.79.Final| | +--- io.netty:netty-common:4.1.79.Final| | +--- io.netty:netty-resolver-dns:4.1.79.Final (*)| | \--- io.netty:netty-transport-native-unix-common:4.1.79.Final (*)| +--- io.netty:netty-transport-native-epoll:4.1.79.Final| | +--- io.netty:netty-common:4.1.79.Final| | +--- io.netty:netty-buffer:4.1.79.Final (*)| | +--- io.netty:netty-transport:4.1.79.Final (*)| | +--- io.netty:netty-transport-native-unix-common:4.1.79.Final (*)| | \--- io.netty:netty-transport-classes-epoll:4.1.79.Final| | +--- io.netty:netty-common:4.1.79.Final| | +--- io.netty:netty-buffer:4.1.79.Final (*)| | +--- io.netty:netty-transport:4.1.79.Final (*)| | \--- io.netty:netty-transport-native-unix-common:4.1.79.Final (*)| +--- io.projectreactor.netty:reactor-netty-core:1.0.21| | +--- io.netty:netty-handler:4.1.79.Final (*)| | +--- io.netty:netty-handler-proxy:4.1.79.Final| | | +--- io.netty:netty-common:4.1.79.Final| | | +--- io.netty:netty-buffer:4.1.79.Final (*)| | | +--- io.netty:netty-transport:4.1.79.Final (*)| | | +--- io.netty:netty-codec:4.1.79.Final (*)| | | +--- io.netty:netty-codec-socks:4.1.79.Final| | | | +--- io.netty:netty-common:4.1.79.Final| | | | +--- io.netty:netty-buffer:4.1.79.Final (*)| | | | +--- io.netty:netty-transport:4.1.79.Final (*)| | | | \--- io.netty:netty-codec:4.1.79.Final (*)| | | \--- io.netty:netty-codec-http:4.1.79.Final (*)| | +--- io.netty:netty-resolver-dns:4.1.79.Final (*)| | +--- io.netty:netty-resolver-dns-native-macos:4.1.79.Final (*)| | +--- io.netty:netty-transport-native-epoll:4.1.79.Final (*)| | \--- io.projectreactor:reactor-core:3.4.20 -> 3.4.21 (*)| \--- io.projectreactor:reactor-core:3.4.20 -> 3.4.21 (*)+--- org.springframework:spring-web:5.3.22 (*)\--- org.springframework:spring-webflux:5.3.22+--- org.springframework:spring-beans:5.3.22 (*)+--- org.springframework:spring-core:5.3.22 (*)+--- org.springframework:spring-web:5.3.22 (*)\--- io.projectreactor:reactor-core:3.4.21 (*)
#参考
- spring-framework | spring-webflux 源码open in new window
- Web on Reactive Stack 官方文档open in new window
- Spring-boot | web reactive 文档open in new window
- 第二学院 reactive 例子代码open in new window
- 第二学院 reactive 文档open in new window
- spring security reactive 安全open in new window
- Spring Cloud Gateway 最佳示范open in new window
- baeldung webfluxopen in new window
- baeldung websoketopen in new window
- baeldung reactive codeopen in new window
- rsocket