Skip to content

Commit

Permalink
Change plain 'WebFlux' links to 'See equivalent in the Reactive stack'
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen authored and mdeinum committed Jun 29, 2023
1 parent a347b23 commit efb48aa
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ converters to use explicitly.

[[rest-message-conversion]]
==== Message Conversion
[.small]#<<web-reactive.adoc#webflux-codecs, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-codecs, See equivalent in the Reactive stack>>#

The `spring-web` module contains the `HttpMessageConverter` contract for reading and
writing the body of HTTP requests and responses through `InputStream` and `OutputStream`.
Expand Down
12 changes: 6 additions & 6 deletions framework-docs/src/docs/asciidoc/web/webflux-websocket.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[webflux-websocket]]
= WebSockets
[.small]#<<web.adoc#websocket, Same as in the Servlet stack>>#
[.small]#<<web.adoc#websocket, See equivalent in the Servlet stack>>#

This part of the reference documentation covers support for reactive-stack WebSocket
messaging.
Expand All @@ -12,7 +12,7 @@ include::websocket-intro.adoc[leveloffset=+1]

[[webflux-websocket-server]]
== WebSocket API
[.small]#<<web.adoc#websocket-server, Same as in the Servlet stack>>#
[.small]#<<web.adoc#websocket-server, See equivalent in the Servlet stack>>#

The Spring Framework provides a WebSocket API that you can use to write client- and
server-side applications that handle WebSocket messages.
Expand All @@ -21,7 +21,7 @@ server-side applications that handle WebSocket messages.

[[webflux-websocket-server-handler]]
=== Server
[.small]#<<web.adoc#websocket-server-handler, Same as in the Servlet stack>>#
[.small]#<<web.adoc#websocket-server-handler, See equivalent in the Servlet stack>>#

To create a WebSocket server, you can first create a `WebSocketHandler`.
The following example shows how to do so:
Expand Down Expand Up @@ -339,7 +339,7 @@ subsequently use `DataBufferUtils.release(dataBuffer)` when the buffers are cons

[[webflux-websocket-server-handshake]]
=== Handshake
[.small]#<<web.adoc#websocket-server-handshake, Same as in the Servlet stack>>#
[.small]#<<web.adoc#websocket-server-handshake, See equivalent in the Servlet stack>>#

`WebSocketHandlerAdapter` delegates to a `WebSocketService`. By default, that is an instance
of `HandshakeWebSocketService`, which performs basic checks on the WebSocket request and
Expand All @@ -354,7 +354,7 @@ into the attributes of the `WebSocketSession`.

[[webflux-websocket-server-config]]
=== Server Configuration
[.small]#<<web.adoc#websocket-server-runtime-configuration, Same as in the Servlet stack>>#
[.small]#<<web.adoc#websocket-server-runtime-configuration, See equivalent in the Servlet stack>>#

The `RequestUpgradeStrategy` for each server exposes configuration specific to the
underlying WebSocket server engine. When using the WebFlux Java config you can customize
Expand Down Expand Up @@ -408,7 +408,7 @@ only Tomcat and Jetty expose such options.

[[webflux-websocket-server-cors]]
=== CORS
[.small]#<<web.adoc#websocket-server-allowed-origins, Same as in the Servlet stack>>#
[.small]#<<web.adoc#websocket-server-allowed-origins, See equivalent in the Servlet stack>>#

The easiest way to configure CORS and restrict access to a WebSocket endpoint is to
have your `WebSocketHandler` implement `CorsConfigurationSource` and return a
Expand Down
14 changes: 7 additions & 7 deletions framework-docs/src/docs/asciidoc/web/webmvc-cors.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[mvc-cors]]
= CORS
[.small]#<<web-reactive.adoc#webflux-cors, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-cors, See equivalent in the Reactive stack>>#

Spring MVC 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.

[[mvc-cors-intro]]
== Introduction
[.small]#<<web-reactive.adoc#webflux-cors-intro, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-cors-intro, See equivalent in the Reactive 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.

[[mvc-cors-processing]]
== Processing
[.small]#<<web-reactive.adoc#webflux-cors-processing, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-cors-processing, See equivalent in the Reactive 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 make advanced customizations, check the code be

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

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

[[mvc-cors-global]]
== Global Configuration
[.small]#<<web-reactive.adoc#webflux-cors-global, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-cors-global, See equivalent in the Reactive 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 All @@ -252,7 +252,7 @@ the `allowOriginPatterns` property may be used to match to a dynamic set of orig

[[mvc-cors-global-java]]
=== Java Configuration
[.small]#<<web-reactive.adoc#webflux-cors-global, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-cors-global, See equivalent in the Reactive stack>>#

To enable CORS in the MVC Java config, you can use the `CorsRegistry` callback,
as the following example shows:
Expand Down Expand Up @@ -329,7 +329,7 @@ as the following example shows:

[[mvc-cors-filter]]
== CORS Filter
[.small]#<<webflux-cors.adoc#webflux-cors-webfilter, WebFlux>>#
[.small]#<<webflux-cors.adoc#webflux-cors-webfilter, See equivalent in the Reactive stack>>#

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

Spring Web MVC includes WebMvc.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#mvc-servlet>>.

[[webmvc-fn-overview]]
== Overview
[.small]#<<web-reactive.adoc#webflux-fn-overview, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-fn-overview, See equivalent in the Reactive stack>>#

In WebMvc.fn, an HTTP request is handled with a `HandlerFunction`: a function that takes
`ServerRequest` and returns a `ServerResponse`.
Expand Down Expand Up @@ -111,7 +111,7 @@ If you register the `RouterFunction` as a bean, for instance by exposing it in a

[[webmvc-fn-handler-functions]]
== HandlerFunction
[.small]#<<web-reactive.adoc#webflux-fn-handler-functions, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-fn-handler-functions, See equivalent in the Reactive stack>>#

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

[[webmvc-fn-router-functions]]
== `RouterFunction`
[.small]#<<web-reactive.adoc#webflux-fn-router-functions, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-fn-router-functions, See equivalent in the Reactive 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 @@ -672,7 +672,7 @@ We can further improve by using the `nest` method together with `accept`:

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

You typically run router functions in a <<web.adoc#mvc-servlet, `DispatcherHandler`>>-based setup through the
<<web.adoc#mvc-config>>, which uses Spring configuration to declare the
Expand Down Expand Up @@ -765,7 +765,7 @@ The following example shows a WebFlux Java configuration:

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

You can filter handler functions by using the `before`, `after`, or `filter` methods on the routing
function builder.
Expand Down
2 changes: 1 addition & 1 deletion framework-docs/src/docs/asciidoc/web/webmvc-test.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[webmvc.test]]
= Testing
[.small]#<<web-reactive.adoc#webflux-test, Same in Spring WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-test, See equivalent in the Reactive stack>>#

This section summarizes the options available in `spring-test` for Spring MVC applications.

Expand Down
24 changes: 12 additions & 12 deletions framework-docs/src/docs/asciidoc/web/webmvc-view.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[mvc-view]]
= View Technologies
[.small]#<<web-reactive.adoc#webflux-view, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-view, See equivalent in the Reactive stack>>#

The use of view technologies in Spring MVC is pluggable. Whether you decide to use
Thymeleaf, Groovy Markup Templates, JSPs, or other technologies is primarily a matter of
Expand All @@ -14,7 +14,7 @@ the templates are editable by external sources, since this can have security imp

[[mvc-view-thymeleaf]]
== Thymeleaf
[.small]#<<web-reactive.adoc#webflux-view-thymeleaf, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-view-thymeleaf, See equivalent in the Reactive 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 helpful
Expand All @@ -34,7 +34,7 @@ See https://www.thymeleaf.org/documentation.html[Thymeleaf+Spring] for more deta

[[mvc-view-freemarker]]
== FreeMarker
[.small]#<<web-reactive.adoc#webflux-view-freemarker, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-view-freemarker, See equivalent in the Reactive 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 @@ -44,7 +44,7 @@ integration for using Spring MVC with FreeMarker templates.

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

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

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

[[mvc-views-freemarker]]
=== FreeMarker Configuration
[.small]#<<web-reactive.adoc#webflux-views-freemarker, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-views-freemarker, See equivalent in the Reactive 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 @@ -164,7 +164,7 @@ with additional convenience macros for generating form input elements themselves

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

A standard set of macros are maintained within the `spring-webmvc.jar` file for
FreeMarker, so they are always available to a suitably configured application.
Expand Down Expand Up @@ -576,7 +576,7 @@ syntax. The following example shows a sample template for an HTML page:

[[mvc-view-script]]
== Script Views
[.small]#<<web-reactive.adoc#webflux-view-script, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-view-script, See equivalent in the Reactive stack>>#

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

[[mvc-view-script-dependencies]]
=== Requirements
[.small]#<<web-reactive.adoc#webflux-view-script-dependencies, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-view-script-dependencies, See equivalent in the Reactive stack>>#

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

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

[[mvc-view-script-integrate]]
=== Script Templates
[.small]#<<web-reactive.adoc#webflux-view-script, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-view-script, See equivalent in the Reactive 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 @@ -1965,15 +1965,15 @@ an external definition (by name) or as a `View` instance from the handler method

[[mvc-view-jackson]]
== Jackson
[.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, See equivalent in the Reactive stack>>#

Spring offers support for the Jackson JSON library.



[[mvc-view-json-mapping]]
=== Jackson-based JSON MVC Views
[.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, See equivalent in the Reactive stack>>#

The `MappingJackson2JsonView` uses the Jackson library's `ObjectMapper` to render the response
content as JSON. By default, the entire contents of the model map (with the exception of
Expand All @@ -1992,7 +1992,7 @@ serializers and deserializers for specific types.

[[mvc-view-xml-mapping]]
=== Jackson-based XML Views
[.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, WebFlux>>#
[.small]#<<web-reactive.adoc#webflux-view-httpmessagewriter, See equivalent in the Reactive stack>>#

`MappingJackson2XmlView` uses the
https://github.com/FasterXML/jackson-dataformat-xml[Jackson XML extension's] `XmlMapper`
Expand Down

0 comments on commit efb48aa

Please sign in to comment.