Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
d61db48d
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d61db48d
编写于
8月 23, 2017
作者:
S
Sebastien Deleuze
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve WebFlux documentation sections
Issue: SPR-15149
上级
9da39272
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
21 deletion
+16
-21
src/docs/asciidoc/web.adoc
src/docs/asciidoc/web.adoc
+0
-2
src/docs/asciidoc/web/web-flux-functional.adoc
src/docs/asciidoc/web/web-flux-functional.adoc
+1
-1
src/docs/asciidoc/web/web-flux.adoc
src/docs/asciidoc/web/web-flux.adoc
+15
-18
未找到文件。
src/docs/asciidoc/web.adoc
浏览文件 @
d61db48d
...
...
@@ -23,6 +23,4 @@ include::web/web-websocket.adoc[leveloffset=+1]
include::web/web-flux.adoc[leveloffset=+1]
include::web/web-flux-functional.adoc[leveloffset=+1]
include::web/web-integration.adoc[leveloffset=+1]
src/docs/asciidoc/web/web-flux-functional.adoc
浏览文件 @
d61db48d
[[webflux-fn]]
=
Spring WebFlux
Functional Programming Model
= Functional Programming Model
[[webflux-fn-handler-functions]]
== HandlerFunctions
...
...
src/docs/asciidoc/web/web-flux.adoc
浏览文件 @
d61db48d
...
...
@@ -5,11 +5,11 @@ This section provides basic information on the reactive programming
support for Web applications in Spring Framework 5.
[[web
-reactive
-intro]]
[[web
flux
-intro]]
== Introduction
[[web-reactive-programming]]
[[web
flux-intro
-reactive-programming]]
=== What is Reactive Programming?
In plain terms reactive programming is about non-blocking applications that are asynchronous
...
...
@@ -31,7 +31,7 @@ https://spring.io/blog/2016/06/07/notes-on-reactive-programming-part-i-the-react
by Dave Syer.
[[web-reactive-api]]
[[web
flux-intro
-reactive-api]]
=== Reactive API and Building Blocks
Spring Framework 5 embraces
...
...
@@ -52,14 +52,14 @@ https://spring.io/blog/2016/04/19/understanding-reactive-types["Understanding Re
by Sebastien Deleuze.
[[web
-reactive
-feature-overview]]
[[web
flux
-feature-overview]]
== Spring WebFlux Module
Spring Framework 5 includes a new `spring-webflux` module. The module contains support
for reactive HTTP and WebSocket clients as well as for reactive server web applications
including REST, HTML browser, and WebSocket style interactions.
[[web
-reactive
-server]]
[[web
flux
-server]]
=== Server Side
On the server-side WebFlux supports 2 distinct programming models:
...
...
@@ -84,7 +84,7 @@ request and response as `Flux<DataBuffer>`, rather than
REST-style JSON and XML serialization and deserialization is supported on top
as a `Flux<Object>`, and so is HTML view rendering and Server-Sent Events.
[[web
-reactive
-server-annotation]]
[[web
flux
-server-annotation]]
==== Annotation-based Programming Model
The same `@Controller` programming model and the same annotations used in Spring MVC
...
...
@@ -123,13 +123,10 @@ public class PersonController {
}
----
[[web-reactive-server-functional]]
==== Functional Programming Model
include::web-flux-functional.adoc[leveloffset=+3]
include::web-flux-functional.adoc[leveloffset=+1]
[[web-reactive-client]]
[[webflux-client]]
=== Client Side
WebFlux includes a functional, reactive `WebClient` that offers a fully
...
...
@@ -163,7 +160,7 @@ still based and relies on `InputStream` and `OutputStream`.
====
[[web
-reactive
-http-body]]
[[web
flux
-http-body]]
=== Request and Response Body Conversion
The `spring-core` module provides reactive `Encoder` and `Decoder` contracts
...
...
@@ -218,7 +215,7 @@ default as following:
reading SSE streams as well.
[[web
-reactive
-websocket-support]]
[[web
flux
-websocket-support]]
=== Reactive WebSocket Support
WebFlux includes reactive WebSocket client and server support.
...
...
@@ -259,7 +256,7 @@ WebSocketClient client = new ReactorNettyWebSocketClient();
client.execute("ws://localhost:8080/echo"), session -> {... }).blockMillis(5000);
----
[[web
-reactive
-tests]]
[[web
flux
-tests]]
=== Testing
The `spring-test` module includes a `WebTestClient` that can be used to test
...
...
@@ -276,11 +273,11 @@ in the framework.
[[web
-reactive
-getting-started]]
[[web
flux
-getting-started]]
== Getting Started
[[web
-reactive
-getting-started-boot]]
[[web
flux
-getting-started-boot]]
=== Spring Boot Starter
The
...
...
@@ -292,7 +289,7 @@ By default the starter runs with Reactor Netty but the dependencies can be chang
with Spring Boot to switch to a different runtime.
See the Spring Boot reference documentation page for more details and instruction.
[[web
-reactive
-getting-started-manual]]
[[web
flux
-getting-started-manual]]
=== Manual Bootstrapping
This section outlines the steps to get up and running manually.
...
...
@@ -367,7 +364,7 @@ You will need to implement one abstract method in order to point to your
Spring configuration.
====
[[web
-reactive
-getting-started-examples]]
[[web
flux
-getting-started-examples]]
=== Examples
You will find code examples useful to build reactive Web application in the following projects:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录