Add ClientHttpRequestFactoryBuilderCustomizer support

Add `ClientHttpRequestFactoryBuilderCustomizer` interface that can be
used to customize the `ClientHttpRequestFactoryBuilder`.

Closes gh-44987
This commit is contained in:
Phillip Webb
2025-04-03 17:19:31 -07:00
parent 983e7b637b
commit 455bb0f835
4 changed files with 87 additions and 4 deletions

View File

@@ -272,7 +272,7 @@ spring:
redirects: dont-follow
----
For more complex customizations, you can declare your own javadoc:org.springframework.boot.http.client.ClientHttpRequestFactoryBuilder[] bean which will cause auto-configuration to back off.
For more complex customizations, you can use javadoc:org.springframework.boot.autoconfigure.http.client.ClientHttpRequestFactoryBuilderCustomizer[] or declare your own javadoc:org.springframework.boot.http.client.ClientHttpRequestFactoryBuilder[] bean which will cause auto-configuration to back off.
This can be useful when you need to customize some of the internals of the underlying HTTP library.
For example, the following will use a JDK client configured with a specific javadoc:java.net.ProxySelector[]: