Skip to content

Commit d4de339

Browse files
floftarrstoyanchev
authored andcommitted
Fix typo about URI Encoding in docs
Closes spring-projectsgh-24603
1 parent 5c2d65b commit d4de339

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/docs/asciidoc/web/web-uris.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ The following example shows how to configure a `RestTemplate`:
134134
.Kotlin
135135
----
136136
// import org.springframework.web.util.DefaultUriBuilderFactory.EncodingMode
137-
137+
138138
val baseUrl = "https://example.org"
139139
val factory = DefaultUriBuilderFactory(baseUrl)
140140
factory.encodingMode = EncodingMode.TEMPLATE_AND_VALUES
@@ -320,11 +320,11 @@ expanded.
320320
* `VALUES_ONLY`: Does not encode the URI template and, instead, applies strict encoding
321321
to URI variables through `UriUtils#encodeUriUriVariables` prior to expanding them into the
322322
template.
323-
* `URI_COMPONENTS`: Uses `UriComponents#encode()`, corresponding to the second option in the earlier list, to
323+
* `URI_COMPONENT`: Uses `UriComponents#encode()`, corresponding to the second option in the earlier list, to
324324
encode URI component value _after_ URI variables are expanded.
325325
* `NONE`: No encoding is applied.
326326

327-
The `RestTemplate` is set to `EncodingMode.URI_COMPONENTS` for historic
327+
The `RestTemplate` is set to `EncodingMode.URI_COMPONENT` for historic
328328
reasons and for backwards compatibility. The `WebClient` relies on the default value
329-
in `DefaultUriBuilderFactory`, which was changed from `EncodingMode.URI_COMPONENTS` in
329+
in `DefaultUriBuilderFactory`, which was changed from `EncodingMode.URI_COMPONENT` in
330330
5.0.x to `EncodingMode.TEMPLATE_AND_VALUES` in 5.1.

0 commit comments

Comments
 (0)