From d4de3396f732773237dc1560f415c6631bf82ed9 Mon Sep 17 00:00:00 2001 From: Florian Berger Date: Wed, 26 Feb 2020 19:05:30 +0200 Subject: [PATCH] Fix typo about URI Encoding in docs Closes gh-24603 --- src/docs/asciidoc/web/web-uris.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/docs/asciidoc/web/web-uris.adoc b/src/docs/asciidoc/web/web-uris.adoc index 58f002a95db..29b3a91ef8c 100644 --- a/src/docs/asciidoc/web/web-uris.adoc +++ b/src/docs/asciidoc/web/web-uris.adoc @@ -134,7 +134,7 @@ The following example shows how to configure a `RestTemplate`: .Kotlin ---- // import org.springframework.web.util.DefaultUriBuilderFactory.EncodingMode - + val baseUrl = "https://example.org" val factory = DefaultUriBuilderFactory(baseUrl) factory.encodingMode = EncodingMode.TEMPLATE_AND_VALUES @@ -320,11 +320,11 @@ expanded. * `VALUES_ONLY`: Does not encode the URI template and, instead, applies strict encoding to URI variables through `UriUtils#encodeUriUriVariables` prior to expanding them into the template. -* `URI_COMPONENTS`: Uses `UriComponents#encode()`, corresponding to the second option in the earlier list, to +* `URI_COMPONENT`: Uses `UriComponents#encode()`, corresponding to the second option in the earlier list, to encode URI component value _after_ URI variables are expanded. * `NONE`: No encoding is applied. -The `RestTemplate` is set to `EncodingMode.URI_COMPONENTS` for historic +The `RestTemplate` is set to `EncodingMode.URI_COMPONENT` for historic reasons and for backwards compatibility. The `WebClient` relies on the default value -in `DefaultUriBuilderFactory`, which was changed from `EncodingMode.URI_COMPONENTS` in +in `DefaultUriBuilderFactory`, which was changed from `EncodingMode.URI_COMPONENT` in 5.0.x to `EncodingMode.TEMPLATE_AND_VALUES` in 5.1.