Skip to content

Commit d29a5a2

Browse files
committed
Merge branch '2.5.x' into 2.6.x
Closes gh-29401
2 parents 8868d34 + e8cbec0 commit d29a5a2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/rest-client.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,19 @@ The following example shows a customizer that configures the use of a proxy for
3838
include::{docs-java}/io/restclient/resttemplate/customization/MyRestTemplateCustomizer.java[]
3939
----
4040

41-
Finally, you can also create your own `RestTemplateBuilder` bean.
42-
To prevent switching off the auto-configuration of a `RestTemplateBuilder` and prevent any `RestTemplateCustomizer` beans from being used, make sure to configure your custom instance with a `RestTemplateBuilderConfigurer`.
43-
The following example exposes a `RestTemplateBuilder` with what Spring Boot would auto-configure, except that custom connect and read timeouts are also specified:
41+
Finally, you can define your own `RestTemplateBuilder` bean.
42+
Doing so will replace the auto-configured builder.
43+
If you want any `RestTemplateCustomizer` beans to be applied to your custom builder, as the auto-configuration would have done, configure it using a `RestTemplateBuilderConfigurer`.
44+
The following example exposes a `RestTemplateBuilder` that matches what Spring Boot's auto-configuration would have done, except that custom connect and read timeouts are also specified:
4445

4546
[source,java,indent=0,subs="verbatim"]
4647
----
4748
include::{docs-java}/io/restclient/resttemplate/customization/MyRestTemplateBuilderConfiguration.java[]
4849
----
4950

5051
The most extreme (and rarely used) option is to create your own `RestTemplateBuilder` bean without using a configurer.
51-
Doing so switches off the auto-configuration of a `RestTemplateBuilder` and prevents any `RestTemplateCustomizer` beans from being used.
52+
In addition to replacing the auto-configured builder, this also prevents any `RestTemplateCustomizer` beans from being used.
53+
5254

5355

5456
[[io.rest-client.webclient]]

0 commit comments

Comments
 (0)