mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-24 18:29:03 +00:00
This commit removes `RestTemplateBuilder.requestFactory(ClientHttpRequestFactory factory)` because it can be misleading. This builder class is meant to be immutable, but calling that method and then timeout related ones will affect the `ClientHttpRequestFactory` instance. Instead, this method is replaced with a `Supplier<ClientHttpRequestFactory>` that is called every time a `RestTemplate` is being built. That approach may reduce the reusability of request factories, but it is much more consistent. Closes gh-11255