Add Builder to HttpServiceProxyFactory

HttpServiceProxyFactory now support programmatic initialization through
a builder, while bean-style initialization is deprecated.

See gh-29296
This commit is contained in:
rstoyanchev
2022-10-17 12:23:42 +01:00
parent e03abc94ff
commit 5cb3af708c
14 changed files with 413 additions and 107 deletions

View File

@@ -390,8 +390,7 @@ Two, create a proxy that will perform the declared HTTP exchanges:
[source,java,indent=0,subs="verbatim,quotes"]
----
WebClient client = WebClient.builder().baseUrl("https://api.github.com/").build();
HttpServiceProxyFactory factory = WebClientAdapter.createHttpServiceProxyFactory(client);
factory.afterPropertiesSet();
HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
RepositoryService service = factory.createClient(RepositoryService.class);
----