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:
Rossen Stoyanchev
2017-08-17 12:45:11 +02:00
parent f1b017af04
commit 11ac87099a
8 changed files with 29 additions and 29 deletions

View File

@@ -13,7 +13,7 @@ IoC container, with any web framework on top, but you can also use only the
transaction management, remote access to your logic through RMI or web services, and various
options for persisting your data.
It offers full-featured web frameworks such as <<web.adoc#mvc-introduction,Spring MVC>>
and <<web.adoc#web-reactive, Spring WebFlux>>; and it enables you to
and <<web.adoc#webflux, Spring WebFlux>>; and it enables you to
integrate <<core.adoc#aop-introduction,AOP>> transparently into your software.
This document is a reference guide to Spring Framework features. Questions on the

View File

@@ -5,17 +5,13 @@
:toc: left
:toclevels: 2
This part of the reference documentation covers Spring Framework's support for the
presentation tier (and specifically web-based presentation tiers) including support
for WebSocket-style messaging in web applications.
Spring Framework's own web framework, <<mvc,Spring Web MVC>>, is covered in the
first couple of chapters. Subsequent chapters are concerned with Spring Framework's
integration with other web technologies, such as <<jsf,JSF>>.
The section then concludes with comprehensive coverage of the Spring Framework
<<websocket>> (including <<websocket-stomp>>).
This part of the documentation covers support for web applications. As of Spring Framework 5.0
web applications can run on a traditional Servlet stack (Servlet API + Servlet container)
or on a reactive stack (Reactive Streams API + non-blocking runtime).
The first few chapters cover the Servlet-based <<mvc,Spring MVC>> web framework
including <<view,Views>>, <<cors,CORS>>, and <<websocket,WebSocket>> support.
Subsequent chapters cover the <<webflux,Spring WebFlux>> reactive web framework
including its <<webflux-fn,WebFlux.fn>> functional programming model.
include::web/web-mvc.adoc[leveloffset=+1]
@@ -23,8 +19,10 @@ include::web/web-view.adoc[leveloffset=+1]
include::web/web-cors.adoc[leveloffset=+1]
include::web/web-integration.adoc[leveloffset=+1]
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]

View File

@@ -1,5 +1,5 @@
[[cors]]
= CORS Support
= Spring Web MVC CORS Support
== Introduction

View File

@@ -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

View File

@@ -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.

View File

@@ -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]]

View File

@@ -1,5 +1,5 @@
[[view]]
= View technologies
= Spring Web MVC View Technologies
[[view-introduction]]

View File

@@ -1,5 +1,5 @@
[[websocket]]
= WebSocket Support
= Servlet Stack WebSocket Support
:doc-spring-security: {doc-root}/spring-security/site/docs/current/reference