From bbfc39efc937b9cd9fb6192364349f4a120cdfc2 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 17 Nov 2022 15:45:31 +0100 Subject: [PATCH] Polishing --- .../src/docs/asciidoc/web/webflux-functional.adoc | 8 +++----- framework-docs/src/docs/asciidoc/web/webmvc.adoc | 6 +----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/framework-docs/src/docs/asciidoc/web/webflux-functional.adoc b/framework-docs/src/docs/asciidoc/web/webflux-functional.adoc index a7130097ba..7f02a004ab 100644 --- a/framework-docs/src/docs/asciidoc/web/webflux-functional.adoc +++ b/framework-docs/src/docs/asciidoc/web/webflux-functional.adoc @@ -98,7 +98,7 @@ as the following example shows: } } ---- -<1> Create router using Coroutines router DSL, a Reactive alternative is also available via `router { }`. +<1> Create router using Coroutines router DSL; a Reactive alternative is also available via `router { }`. One way to run a `RouterFunction` is to turn it into an `HttpHandler` and install it through one of the built-in <>: @@ -300,7 +300,6 @@ ServerResponse.created(location).build() Depending on the codec used, it is possible to pass hint parameters to customize how the body is serialized or deserialized. For example, to specify a https://www.baeldung.com/jackson-json-view-annotation[Jackson JSON view]: -==== [source,java,role="primary"] .Java ---- @@ -311,7 +310,6 @@ ServerResponse.ok().hint(Jackson2CodecSupport.JSON_VIEW_HINT, MyJacksonView.clas ---- ServerResponse.ok().hint(Jackson2CodecSupport.JSON_VIEW_HINT, MyJacksonView::class.java).body(...) ---- -==== [[webflux-fn-handler-classes]] @@ -525,8 +523,8 @@ header: ---- val route = coRouter { GET("/hello-world", accept(TEXT_PLAIN)) { - ServerResponse.ok().bodyValueAndAwait("Hello World") - } + ServerResponse.ok().bodyValueAndAwait("Hello World") + } } ---- diff --git a/framework-docs/src/docs/asciidoc/web/webmvc.adoc b/framework-docs/src/docs/asciidoc/web/webmvc.adoc index ff5d4fdae7..bdf7fca7c5 100644 --- a/framework-docs/src/docs/asciidoc/web/webmvc.adoc +++ b/framework-docs/src/docs/asciidoc/web/webmvc.adoc @@ -3559,8 +3559,6 @@ to the model, as the following example shows: [source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"] .Kotlin ---- - import org.springframework.ui.set - @Controller class UserController : AbstractController() { @@ -4792,7 +4790,7 @@ are written to the Reactor `Context` as key-value pairs, using the key assigned For other asynchronous handling scenarios, you can use the Context Propagation library directly. For example: -[source,java,indent=0,subs="verbatim,quotes",role="primary"] +[source,java,indent=0,subs="verbatim,quotes"] .Java ---- // Capture ThreadLocal values from the main thread ... @@ -5914,7 +5912,6 @@ The MVC namespace provides dedicated elements. The following example works with [source,xml,indent=0,subs="verbatim,quotes"] ---- - @@ -5927,7 +5924,6 @@ The MVC namespace provides dedicated elements. The following example works with - ---- In Java configuration, you can add the respective `Configurer` bean,