From f28ab918bc9c03e4ff9b9bcc3ef7a53bf049c07e Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 10 Jan 2020 13:13:46 +0100 Subject: [PATCH] =?UTF-8?q?Rename=20WebClientBuilder.requestFactory(?= =?UTF-8?q?=E2=80=A6)=20to=20httpConnectorFactory(=E2=80=A6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes gh-517 --- .../vault/client/WebClientBuilder.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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}.