• Brian Clozel's avatar
    Auto-configure HTTP client builders as Lazy · 0f567c87
    Brian Clozel authored
    Prior to this commit, HTTP client builders auto-configured by Spring
    Boot would be eagerly instantiating resources, even if those were not
    used by the application.
    
    This commit makes the `RestTemplateBuilder` bean as Lazy.
    `WebClient.Builder` was already a prototype bean, but some of its
    dependencies could consume resources, like the `HttpClientConnector` and
    the related infrastructure. This commit makes those pieces lazy.
    
    Note that since those components are meant to help instantiate actual
    HTTP clients for application components, making them lazy won't make any
    difference at runtime since they'll be used during context refresh, or
    they won't be used at all.
    
    Closes gh-19549
    0f567c87
Name
Last commit
Last update
..
src Loading commit data...
build.gradle Loading commit data...