Skip to content

Commit

Permalink
Change plain 'WebMVC' links to 'See equivalent in the Servlet stack'
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbasle authored and sbrannen committed Dec 17, 2022
1 parent 11f3edc commit 14c7b9b
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 101 deletions.
12 changes: 6 additions & 6 deletions framework-docs/src/docs/asciidoc/web/webflux-cors.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[webflux-cors]]
= CORS
[.small]#<<web.adoc#mvc-cors, Web MVC>>#
[.small]#<<web.adoc#mvc-cors, See equivalent in the Servlet stack>>#

Spring WebFlux lets you handle CORS (Cross-Origin Resource Sharing). This section
describes how to do so.
Expand All @@ -10,7 +10,7 @@ describes how to do so.

[[webflux-cors-intro]]
== Introduction
[.small]#<<web.adoc#mvc-cors-intro, Web MVC>>#
[.small]#<<web.adoc#mvc-cors-intro, See equivalent in the Servlet stack>>#

For security reasons, browsers prohibit AJAX calls to resources outside the current origin.
For example, you could have your bank account in one tab and evil.com in another. Scripts
Expand All @@ -27,7 +27,7 @@ powerful workarounds based on IFRAME or JSONP.

[[webflux-cors-processing]]
== Processing
[.small]#<<web.adoc#mvc-cors-processing, Web MVC>>#
[.small]#<<web.adoc#mvc-cors-processing, See equivalent in the Servlet stack>>#

The CORS specification distinguishes between preflight, simple, and actual requests.
To learn how CORS works, you can read
Expand Down Expand Up @@ -77,7 +77,7 @@ To learn more from the source or to make advanced customizations, see:

[[webflux-cors-controller]]
== `@CrossOrigin`
[.small]#<<web.adoc#mvc-cors-controller, Web MVC>>#
[.small]#<<web.adoc#mvc-cors-controller, See equivalent in the Servlet stack>>#

The {api-spring-framework}/web/bind/annotation/CrossOrigin.html[`@CrossOrigin`]
annotation enables cross-origin requests on annotated controller methods, as the
Expand Down Expand Up @@ -237,7 +237,7 @@ as the following example shows:

[[webflux-cors-global]]
== Global Configuration
[.small]#<<web.adoc#mvc-cors-global, Web MVC>>#
[.small]#<<web.adoc#mvc-cors-global, See equivalent in the Servlet stack>>#

In addition to fine-grained, controller method-level configuration, you probably want to
define some global CORS configuration, too. You can set URL-based `CorsConfiguration`
Expand Down Expand Up @@ -308,7 +308,7 @@ as the following example shows:

[[webflux-cors-webfilter]]
== CORS `WebFilter`
[.small]#<<web.adoc#mvc-cors-filter, Web MVC>>#
[.small]#<<web.adoc#mvc-cors-filter, See equivalent in the Servlet stack>>#

You can apply CORS support through the built-in
{api-spring-framework}/web/cors/reactive/CorsWebFilter.html[`CorsWebFilter`], which is a
Expand Down
12 changes: 6 additions & 6 deletions framework-docs/src/docs/asciidoc/web/webflux-functional.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[webflux-fn]]
= Functional Endpoints
[.small]#<<web.adoc#webmvc-fn, Web MVC>>#
[.small]#<<web.adoc#webmvc-fn, See equivalent in the Servlet stack>>#

Spring WebFlux includes WebFlux.fn, a lightweight functional programming model in which functions
are used to route and handle requests and contracts are designed for immutability.
Expand All @@ -12,7 +12,7 @@ the same <<web-reactive.adoc#webflux-reactive-spring-web>> foundation.

[[webflux-fn-overview]]
== Overview
[.small]#<<web.adoc#webmvc-fn-overview, Web MVC>>#
[.small]#<<web.adoc#webmvc-fn-overview, See equivalent in the Servlet stack>>#

In WebFlux.fn, an HTTP request is handled with a `HandlerFunction`: a function that takes
`ServerRequest` and returns a delayed `ServerResponse` (i.e. `Mono<ServerResponse>`).
Expand Down Expand Up @@ -113,7 +113,7 @@ Most applications can run through the WebFlux Java configuration, see <<webflux-

[[webflux-fn-handler-functions]]
== HandlerFunction
[.small]#<<web.adoc#webmvc-fn-handler-functions, Web MVC>>#
[.small]#<<web.adoc#webmvc-fn-handler-functions, See equivalent in the Servlet stack>>#

`ServerRequest` and `ServerResponse` are immutable interfaces that offer JDK 8-friendly
access to the HTTP request and response.
Expand Down Expand Up @@ -486,7 +486,7 @@ See <<core.adoc#validation-beanvalidation, Spring Validation>>.

[[webflux-fn-router-functions]]
== `RouterFunction`
[.small]#<<web.adoc#webmvc-fn-router-functions, Web MVC>>#
[.small]#<<web.adoc#webmvc-fn-router-functions, See equivalent in the Servlet stack>>#

Router functions are used to route the requests to the corresponding `HandlerFunction`.
Typically, you do not write router functions yourself, but rather use a method on the
Expand Down Expand Up @@ -687,7 +687,7 @@ We can further improve by using the `nest` method together with `accept`:

[[webflux-fn-running]]
== Running a Server
[.small]#<<web.adoc#webmvc-fn-running, Web MVC>>#
[.small]#<<web.adoc#webmvc-fn-running, See equivalent in the Servlet stack>>#

How do you run a router function in an HTTP server? A simple option is to convert a router
function to an `HttpHandler` by using one of the following:
Expand Down Expand Up @@ -793,7 +793,7 @@ The following example shows a WebFlux Java configuration (see

[[webflux-fn-handler-filter-function]]
== Filtering Handler Functions
[.small]#<<web.adoc#webmvc-fn-handler-filter-function, Web MVC>>#
[.small]#<<web.adoc#webmvc-fn-handler-filter-function, See equivalent in the Servlet stack>>#

You can filter handler functions by using the `before`, `after`, or `filter` methods on the routing
function builder.
Expand Down
22 changes: 11 additions & 11 deletions framework-docs/src/docs/asciidoc/web/webflux-view.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[webflux-view]]
= View Technologies
[.small]#<<web.adoc#mvc-view, Web MVC>>#
[.small]#<<web.adoc#mvc-view, See equivalent in the Servlet stack>>#

The use of view technologies in Spring WebFlux is pluggable. Whether you decide to
use Thymeleaf, FreeMarker, or some other view technology is primarily a matter of a
Expand All @@ -12,7 +12,7 @@ WebFlux. We assume you are already familiar with <<webflux-viewresolution>>.

[[webflux-view-thymeleaf]]
== Thymeleaf
[.small]#<<web.adoc#mvc-view-thymeleaf, Web MVC>>#
[.small]#<<web.adoc#mvc-view-thymeleaf, See equivalent in the Servlet stack>>#

Thymeleaf is a modern server-side Java template engine that emphasizes natural HTML
templates that can be previewed in a browser by double-clicking, which is very
Expand All @@ -33,7 +33,7 @@ https://web.archive.org/web/20210623051330/http%3A//forum.thymeleaf.org/Thymelea

[[webflux-view-freemarker]]
== FreeMarker
[.small]#<<web.adoc#mvc-view-freemarker, Web MVC>>#
[.small]#<<web.adoc#mvc-view-freemarker, See equivalent in the Servlet stack>>#

https://freemarker.apache.org/[Apache FreeMarker] is a template engine for generating any
kind of text output from HTML to email and others. The Spring Framework has built-in
Expand All @@ -43,7 +43,7 @@ integration for using Spring WebFlux with FreeMarker templates.

[[webflux-view-freemarker-contextconfig]]
=== View Configuration
[.small]#<<web.adoc#mvc-view-freemarker-contextconfig, Web MVC>>#
[.small]#<<web.adoc#mvc-view-freemarker-contextconfig, See equivalent in the Servlet stack>>#

The following example shows how to configure FreeMarker as a view technology:

Expand Down Expand Up @@ -98,7 +98,7 @@ returns the view name, `welcome`, the resolver looks for the

[[webflux-views-freemarker]]
=== FreeMarker Configuration
[.small]#<<web.adoc#mvc-views-freemarker, Web MVC>>#
[.small]#<<web.adoc#mvc-views-freemarker, See equivalent in the Servlet stack>>#

You can pass FreeMarker 'Settings' and 'SharedVariables' directly to the FreeMarker
`Configuration` object (which is managed by Spring) by setting the appropriate bean
Expand Down Expand Up @@ -151,7 +151,7 @@ the `Configuration` object.

[[webflux-view-freemarker-forms]]
=== Form Handling
[.small]#<<web.adoc#mvc-view-freemarker-forms, Web MVC>>#
[.small]#<<web.adoc#mvc-view-freemarker-forms, See equivalent in the Servlet stack>>#

Spring provides a tag library for use in JSPs that contains, among others, a
`<spring:bind/>` element. This element primarily lets forms display values from
Expand All @@ -162,7 +162,7 @@ with additional convenience macros for generating form input elements themselves

[[webflux-view-bind-macros]]
==== The Bind Macros
[.small]#<<web.adoc#mvc-view-bind-macros, Web MVC>>#
[.small]#<<web.adoc#mvc-view-bind-macros, See equivalent in the Servlet stack>>#

A standard set of macros are maintained within the `spring-webflux.jar` file for
FreeMarker, so they are always available to a suitably configured application.
Expand Down Expand Up @@ -193,7 +193,7 @@ sections of the Spring MVC documentation.

[[webflux-view-script]]
== Script Views
[.small]#<<web.adoc#mvc-view-script, Web MVC>>#
[.small]#<<web.adoc#mvc-view-script, See equivalent in the Servlet stack>>#

The Spring Framework has a built-in integration for using Spring WebFlux with any
templating library that can run on top of the
Expand All @@ -219,7 +219,7 @@ TIP: The basic rule for integrating any other script engine is that it must impl

[[webflux-view-script-dependencies]]
=== Requirements
[.small]#<<web.adoc#mvc-view-script-dependencies, Web MVC>>#
[.small]#<<web.adoc#mvc-view-script-dependencies, See equivalent in the Servlet stack>>#

You need to have the script engine on your classpath, the details of which vary by script engine:

Expand All @@ -239,7 +239,7 @@ through https://www.webjars.org/[WebJars].

[[webflux-view-script-integrate]]
=== Script Templates
[.small]#<<web.adoc#mvc-view-script-integrate, Web MVC>>#
[.small]#<<web.adoc#mvc-view-script-integrate, See equivalent in the Servlet stack>>#

You can declare a `ScriptTemplateConfigurer` bean to specify the script engine to use,
the script files to load, what function to call to render templates, and so on.
Expand Down Expand Up @@ -389,7 +389,7 @@ for more configuration examples.

[[webflux-view-httpmessagewriter]]
== JSON and XML
[.small]#<<web.adoc#mvc-view-jackson, Web MVC>>#
[.small]#<<web.adoc#mvc-view-jackson, See equivalent in the Servlet stack>>#

For <<webflux-multiple-representations>> purposes, it is useful to be able to alternate
between rendering a model with an HTML template or as other formats (such as JSON or XML),
Expand Down

0 comments on commit 14c7b9b

Please sign in to comment.