-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Auto-configure WebClient.Builder components #9522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
bclozel
added a commit
to bclozel/spring-boot
that referenced
this issue
Jun 20, 2017
Even if WebFlux' `WebClient` has its own builder API, Spring Boot provides an extra layer on top of it with `WebClientBuilder`. This builder interface extends `WebClient.Builder` and provides an additional method to apply `WebClientCustomizer` instances to the client being built. With that infrastructure, Spring Boot can provide a stateless `WebClient` builder to the application context so that developers can create `WebClient` instances with Spring Boot conventions applied automatically. Closes spring-projectsgh-9522
bclozel
added a commit
to bclozel/spring-boot
that referenced
this issue
Jun 20, 2017
Even if WebFlux' `WebClient` has its own builder API, Spring Boot provides an extra layer on top of it with `WebClientBuilder`. This builder interface extends `WebClient.Builder` and provides an additional method to apply `WebClientCustomizer` instances to the client being built. With that infrastructure, Spring Boot can provide a stateless `WebClient` builder to the application context so that developers can create `WebClient` instances with Spring Boot conventions applied automatically. Closes spring-projectsgh-9522
bclozel
added a commit
to bclozel/spring-boot
that referenced
this issue
Jun 21, 2017
Even if WebFlux' `WebClient` has its own builder API, Spring Boot provides an extra layer on top of it with `WebClientBuilder`. This builder interface extends `WebClient.Builder` and provides an additional method to apply `WebClientCustomizer` instances to the client being built. With that infrastructure, Spring Boot can provide a stateless `WebClient` builder to the application context so that developers can create `WebClient` instances with Spring Boot conventions applied automatically. Closes spring-projectsgh-9522
The initial attempt to resolve that is about to be rewritten, once SPR-15690 is resolved. |
bclozel
added a commit
to bclozel/spring-boot
that referenced
this issue
Jun 22, 2017
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 spring-projectsgh-9522
bclozel
added a commit
to bclozel/spring-boot
that referenced
this issue
Jun 23, 2017
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 spring-projectsgh-9522
bclozel
added a commit
that referenced
this issue
Jul 7, 2017
This commit adds new reference documentation sections about WebFlux support in Spring Boot: * Support for multiple HTTP servers (gh-8403) * `CodecCustomizer` and JSON codecs (gh-8897, gh-9166) * `WebClient.Builder` auto-configuration (gh-9522) * Tests with `@WebFluxTest` (gh-8401) * `WebTestClient` auto-configuration (gh-8399) * Support for Thymeleafi and Mustache templating (gh-8124, gh-8648) * Choose another HTTP server with WebFlux (closes gh-9690)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In order to apply #9166 to
WebClient
instances, we need to customizeWebClient.Builder
instances with Boot's configuration. One could compare this feature with theRestTemplateBuilder
, but there are a few differences:WebClient.Builder
already exists in webfluxWebClient.Builder
is stateful, meaning we can't expose it as a singleton component, otherwise further customizations made by Spring developers might be applied in different, unintended, placesWebClient.Builder
has a clone methodWebClient
is itself stateless but can expose a new builder instance with itsmutate
methodWebClient.Builder
(like codecs), and then give that to developers for further changesThe text was updated successfully, but these errors were encountered: