Class RestClientAutoConfiguration
java.lang.Object
org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration
@AutoConfiguration(after=HttpMessageConvertersAutoConfiguration.class)
@ConditionalOnClass(org.springframework.web.client.RestClient.class)
@Conditional(org.springframework.boot.autoconfigure.web.client.NotReactiveWebApplicationCondition.class)
public class RestClientAutoConfiguration
extends Object
Auto-configuration
for RestClient
.
This will produce a RestClient.Builder
bean with the prototype
scope, meaning each injection point
will receive a newly cloned instance of the builder.
- Since:
- 3.2.0
- Author:
- Arjen Poutsma
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionhttpMessageConvertersRestClientCustomizer
(ObjectProvider<HttpMessageConverters> messageConverters) restClientBuilder
(ObjectProvider<RestClientCustomizer> customizerProvider)
-
Constructor Details
-
RestClientAutoConfiguration
public RestClientAutoConfiguration()
-
-
Method Details
-
httpMessageConvertersRestClientCustomizer
@Bean @ConditionalOnMissingBean @Order(2147483647) public HttpMessageConvertersRestClientCustomizer httpMessageConvertersRestClientCustomizer(ObjectProvider<HttpMessageConverters> messageConverters) -
restClientBuilder
@Bean @Scope("prototype") @ConditionalOnMissingBean public RestClient.Builder restClientBuilder(ObjectProvider<RestClientCustomizer> customizerProvider)
-