Skip to content

Commit 1471db2

Browse files
committed
Merge pull request #13714 from Welton Rodrigo Torres Nascimento
* gh-13714: Polish "Clarify that RestTemplateBuilder overwrites default converters" Clarify that RestTemplateBuilder overwrites default converters
2 parents 17e9a2e + 5c1d22e commit 1471db2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ public RestTemplateBuilder rootUri(String rootUri) {
169169
/**
170170
* Set the {@link HttpMessageConverter HttpMessageConverters} that should be used with
171171
* the {@link RestTemplate}. Setting this value will replace any previously configured
172-
* converters.
172+
* converters and any converters configured on the builder will replace RestTemplate's
173+
* default converters.
173174
* @param messageConverters the converters to set
174175
* @return a new builder instance
175176
* @see #additionalMessageConverters(HttpMessageConverter...)
@@ -183,7 +184,8 @@ public RestTemplateBuilder messageConverters(
183184
/**
184185
* Set the {@link HttpMessageConverter HttpMessageConverters} that should be used with
185186
* the {@link RestTemplate}. Setting this value will replace any previously configured
186-
* converters.
187+
* converters and any converters configured on the builder will replace RestTemplate's
188+
* default converters.
187189
* @param messageConverters the converters to set
188190
* @return a new builder instance
189191
* @see #additionalMessageConverters(HttpMessageConverter...)
@@ -201,7 +203,8 @@ public RestTemplateBuilder messageConverters(
201203

202204
/**
203205
* Add additional {@link HttpMessageConverter HttpMessageConverters} that should be
204-
* used with the {@link RestTemplate}.
206+
* used with the {@link RestTemplate}. Any converters configured on the builder will
207+
* replace RestTemplate's default converters.
205208
* @param messageConverters the converters to add
206209
* @return a new builder instance
207210
* @see #messageConverters(HttpMessageConverter...)
@@ -214,7 +217,8 @@ public RestTemplateBuilder additionalMessageConverters(
214217

215218
/**
216219
* Add additional {@link HttpMessageConverter HttpMessageConverters} that should be
217-
* used with the {@link RestTemplate}.
220+
* used with the {@link RestTemplate}. Any converters configured on the builder will
221+
* replace RestTemplate's default converters.
218222
* @param messageConverters the converters to add
219223
* @return a new builder instance
220224
* @see #messageConverters(HttpMessageConverter...)

0 commit comments

Comments
 (0)