Skip to content

Commit 3dbeff5

Browse files
weltonrodrigowilkinsona
authored andcommitted
Clarify that RestTemplateBuilder overwrites default converters
See gh-13714
1 parent 17e9a2e commit 3dbeff5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ public RestTemplateBuilder messageConverters(
201201

202202
/**
203203
* Add additional {@link HttpMessageConverter HttpMessageConverters} that should be
204-
* used with the {@link RestTemplate}.
204+
* used with the {@link RestTemplate}. The final list of converters replace any
205+
* RestTemplate came configured with.
205206
* @param messageConverters the converters to add
206207
* @return a new builder instance
207208
* @see #messageConverters(HttpMessageConverter...)
@@ -214,7 +215,8 @@ public RestTemplateBuilder additionalMessageConverters(
214215

215216
/**
216217
* Add additional {@link HttpMessageConverter HttpMessageConverters} that should be
217-
* used with the {@link RestTemplate}.
218+
* used with the {@link RestTemplate}. The final list of converters replace any
219+
* RestTemplate came configured with.
218220
* @param messageConverters the converters to add
219221
* @return a new builder instance
220222
* @see #messageConverters(HttpMessageConverter...)

0 commit comments

Comments
 (0)