Auto-configure WebClient.Builder

This commit adds a new customizer interface for applying
configuration changes to `WebClient.Builder` beans:
`WebClientCustomizer`.

The new WebClient auto-configuration will make available, as a
prototype scoped bean, `WebClient.Builder` instances.
Once injected, developers can use those to create `WebClient`
instances to be used in their application.

`WebClientCustomizer` beans are sorted according to their
`Order` and then applied to the builder instances.

Closes gh-9522
This commit is contained in:
Brian Clozel
2017-06-19 10:03:53 +02:00
parent 89af4a65cf
commit 4ce726b1a0
6 changed files with 237 additions and 4 deletions

View File

@@ -110,7 +110,8 @@ org.springframework.boot.test.autoconfigure.web.client.WebClientRestTemplateAuto
org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration,\
org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration,\
org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration,\
org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration
org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration,\
org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration
# AutoConfigureWebMvc auto-configuration imports
org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc=\