Skip to content

Commit 80f568b

Browse files
committed
Clarify RestTemplateBuilder rootUri documentation
Closes gh-15343
1 parent 5f33643 commit 80f568b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ public RestTemplateBuilder detectRequestFactory(boolean detectRequestFactory) {
133133

134134
/**
135135
* Set a root URL that should be applied to each request that starts with {@code '/'}.
136-
* See {@link RootUriTemplateHandler} for details.
136+
* Since this works by adding a {@link UriTemplateHandler} to the
137+
* {@link RestTemplate}, the root URL will only apply when {@code String} variants of
138+
* the {@link RestTemplate} methods are used for specifying the request URL. See
139+
* {@link RootUriTemplateHandler} for details.
137140
* @param rootUri the root URI or {@code null}
138141
* @return a new builder instance
139142
*/

0 commit comments

Comments
 (0)