Closed
Description
In order to apply #9166 to WebClient
instances, we need to customize WebClient.Builder
instances with Boot's configuration. One could compare this feature with the RestTemplateBuilder
, 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
method- Spring Boot should apply a few auto-configured customizations on the
WebClient.Builder
(like codecs), and then give that to developers for further changes