Prepare Web section for Servlet vs Reactive content
Refer to both Servlet and reactive stacks in web.adoc Move web-integration.adoc to the very end Link in web-flux-functional.adoc Insert "Spring Web MVC" or "Servlet" prefix in chapter titles Issue: SPR-15149
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
[[cors]]
|
||||
= CORS Support
|
||||
= Spring Web MVC CORS Support
|
||||
|
||||
== Introduction
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
==== Functional Programming Model
|
||||
[[webflux-fn]]
|
||||
= Spring WebFlux Functional Programming Model
|
||||
|
||||
NOTE: This section is to be merged into `web-flux.adoc`.
|
||||
|
||||
===== HandlerFunctions
|
||||
[[webflux-fn-handler-functions]]
|
||||
== HandlerFunctions
|
||||
|
||||
Incoming HTTP requests are handled by a **`HandlerFunction`**, which is essentially a function that
|
||||
takes a `ServerRequest` and returns a `Mono<ServerResponse>`. The annotation counterpart to a
|
||||
@@ -110,7 +110,8 @@ when the `Person` has been saved.
|
||||
variable `id`. We retrieve that `Person` via the repository, and create a JSON response if it is
|
||||
found. If it is not found, we use `switchIfEmpty(Mono<T>)` to return a 404 Not Found response.
|
||||
|
||||
===== RouterFunctions
|
||||
[[webflux-fn-router-functions]]
|
||||
== RouterFunctions
|
||||
|
||||
Incoming requests are routed to handler functions with a **`RouterFunction`**, which is a function
|
||||
that takes a `ServerRequest`, and returns a `Mono<HandlerFunction>`. If a request matches a
|
||||
@@ -171,7 +172,8 @@ Most of the predicates found in `RequestPredicates` are compositions.
|
||||
For instance, `RequestPredicates.GET(String)` is a composition of
|
||||
`RequestPredicates.method(HttpMethod)` and `RequestPredicates.path(String)`.
|
||||
|
||||
====== Running a Server
|
||||
[[webflux-fn-running]]
|
||||
=== Running a Server
|
||||
|
||||
Now there is just one piece of the puzzle missing: running a router function in an HTTP server.
|
||||
You can convert a router function into a `HttpHandler` by using
|
||||
@@ -206,10 +208,10 @@ tomcatServer.start();
|
||||
----
|
||||
|
||||
|
||||
// TODO: DispatcherHandler
|
||||
|
||||
TODO: DispatcherHandler
|
||||
|
||||
===== HandlerFilterFunction
|
||||
[[webflux-fn-handler-filter-function]]
|
||||
== HandlerFilterFunction
|
||||
|
||||
Routes mapped by a router function can be filtered by calling
|
||||
`RouterFunction.filter(HandlerFilterFunction)`, where `HandlerFilterFunction` is essentially a
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[web-reactive]]
|
||||
= WebFlux framework
|
||||
[[webflux]]
|
||||
= Spring WebFlux framework
|
||||
|
||||
This section provides basic information on the reactive programming
|
||||
support for Web applications in Spring Framework 5.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[mvc]]
|
||||
= Web MVC framework
|
||||
= Spring Web MVC framework
|
||||
:doc-spring-security: {doc-root}/spring-security/site/docs/current/reference
|
||||
|
||||
[[mvc-introduction]]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[view]]
|
||||
= View technologies
|
||||
= Spring Web MVC View Technologies
|
||||
|
||||
|
||||
[[view-introduction]]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[websocket]]
|
||||
= WebSocket Support
|
||||
= Servlet Stack WebSocket Support
|
||||
:doc-spring-security: {doc-root}/spring-security/site/docs/current/reference
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user