diff --git a/spring-vault-core/src/main/java/org/springframework/vault/client/WebClientBuilder.java b/spring-vault-core/src/main/java/org/springframework/vault/client/WebClientBuilder.java index 69271758..f2804b50 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/client/WebClientBuilder.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/client/WebClientBuilder.java @@ -117,8 +117,10 @@ public class WebClientBuilder { * * @param httpConnector the supplier for the HTTP connector. * @return {@code this} {@link WebClientBuilder}. + * @since 2.2.1 */ - public WebClientBuilder requestFactory(Supplier httpConnector) { + public WebClientBuilder httpConnectorFactory( + Supplier httpConnector) { Assert.notNull(httpConnector, "Supplier of ClientHttpConnector must not be null"); @@ -126,6 +128,20 @@ public class WebClientBuilder { return this; } + /** + * Set the {@link Supplier} of {@link ClientHttpConnector} that should be called each + * time we {@link #build()} a new {@link WebClient} instance. + * + * @param httpConnector the supplier for the HTTP connector. + * @return {@code this} {@link WebClientBuilder}. + * @deprecated since 2.2.1 as the name is wrong, use + * {@link #httpConnectorFactory(Supplier)} + */ + @Deprecated + public WebClientBuilder requestFactory(Supplier httpConnector) { + return httpConnectorFactory(httpConnector); + } + /** * Add a default header that will be set if not already present on the outgoing * {@link HttpRequest}.