Rename 'spring.http.client' properties to 'spring.http.client.settings'
Deprecate 'spring.http.client' properties in favor of 'spring.http.client.settings` to align with the new reactive client properties. Closes gh-44958
This commit is contained in:
@@ -248,7 +248,7 @@ If multiple clients are available on the classpath, and not global configuration
|
||||
[[io.rest-client.clienthttprequestfactory.configuration]]
|
||||
=== Global HTTP Client Configuration
|
||||
|
||||
If the auto-detected HTTP client does not meet your needs, you can use the configprop:spring.http.client.factory[] property to pick a specific factory.
|
||||
If the auto-detected HTTP client does not meet your needs, you can use the configprop:spring.http.client.settings.factory[] property to pick a specific factory.
|
||||
For example, if you have Apache HttpClient on your classpath, but you prefer Jetty's javadoc:org.eclipse.jetty.client.HttpClient[] you can add the following:
|
||||
|
||||
[configprops,yaml]
|
||||
@@ -256,7 +256,8 @@ For example, if you have Apache HttpClient on your classpath, but you prefer Jet
|
||||
spring:
|
||||
http:
|
||||
client:
|
||||
factory: jetty
|
||||
settings:
|
||||
factory: jetty
|
||||
----
|
||||
|
||||
You can also set properties to change defaults that will be applied to all clients.
|
||||
@@ -267,9 +268,10 @@ For example, you may want to change timeouts and if redirects are followed:
|
||||
spring:
|
||||
http:
|
||||
client:
|
||||
connect-timeout: 2s
|
||||
read-timeout: 1s
|
||||
redirects: dont-follow
|
||||
settings:
|
||||
connect-timeout: 2s
|
||||
read-timeout: 1s
|
||||
redirects: dont-follow
|
||||
----
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user