From c83fb69d9b5ba48dc373af6b363ad33ad2820d72 Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Sun, 1 Mar 2026 18:51:43 +0700 Subject: [PATCH] Fix links to UriComponentsBuilder and polish examples Closes gh-36403 Signed-off-by: Tran Ngoc Nhan (cherry picked from commit b2b731b0ba207367ce09ce6c10e81fe3595589b7) --- .../modules/ROOT/partials/web/web-uris.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/framework-docs/modules/ROOT/partials/web/web-uris.adoc b/framework-docs/modules/ROOT/partials/web/web-uris.adoc index 8ba08ac1cbd..6dc01bcfd7a 100644 --- a/framework-docs/modules/ROOT/partials/web/web-uris.adoc +++ b/framework-docs/modules/ROOT/partials/web/web-uris.adoc @@ -128,7 +128,7 @@ Kotlin:: = UriBuilder [.small]#Spring MVC and Spring WebFlux# -<> implements `UriBuilder`. You can create a +<> implements `UriBuilder`. You can create a `UriBuilder`, in turn, with a `UriBuilderFactory`. Together, `UriBuilderFactory` and `UriBuilder` provide a pluggable mechanism to build URIs from URI templates, based on shared configuration, such as a base URL, encoding preferences, and other details. @@ -373,14 +373,14 @@ Java:: [source,java,indent=0,subs="verbatim,quotes"] ---- String baseUrl = "https://example.com"; - DefaultUriBuilderFactory factory = new DefaultUriBuilderFactory(baseUrl) + DefaultUriBuilderFactory factory = new DefaultUriBuilderFactory(baseUrl); factory.setEncodingMode(EncodingMode.TEMPLATE_AND_VALUES); - // Customize the RestTemplate.. + // Customize the RestTemplate. RestTemplate restTemplate = new RestTemplate(); restTemplate.setUriTemplateHandler(factory); - // Customize the WebClient.. + // Customize the WebClient. WebClient client = WebClient.builder().uriBuilderFactory(factory).build(); ---- @@ -393,12 +393,12 @@ Kotlin:: encodingMode = EncodingMode.TEMPLATE_AND_VALUES } - // Customize the RestTemplate.. + // Customize the RestTemplate. val restTemplate = RestTemplate().apply { uriTemplateHandler = factory } - // Customize the WebClient.. + // Customize the WebClient. val client = WebClient.builder().uriBuilderFactory(factory).build() ---- ======