Reverse order of RestClient and RestTemplate adapters in HTTP interface section
This commit is contained in:
parent
4786e2bf53
commit
52c77d89e9
|
@ -394,7 +394,18 @@ either using `WebClient`:
|
|||
RepositoryService service = factory.createClient(RepositoryService.class);
|
||||
----
|
||||
|
||||
using `RestTemplate`:
|
||||
using `RestClient`:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
----
|
||||
RestClient restClient = RestClient.builder().baseUrl("https://api.github.com/").build();
|
||||
RestClientAdapter adapter = RestClientAdapter.create(restClient);
|
||||
HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(adapter).build();
|
||||
|
||||
RepositoryService service = factory.createClient(RepositoryService.class);
|
||||
----
|
||||
|
||||
or using `RestTemplate`:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
----
|
||||
|
@ -406,17 +417,6 @@ using `RestTemplate`:
|
|||
RepositoryService service = factory.createClient(RepositoryService.class);
|
||||
----
|
||||
|
||||
or using `RestClient`:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
----
|
||||
RestClient restClient = RestClient.builder().baseUrl("https://api.github.com/").build();
|
||||
RestClientAdapter adapter = RestClientAdapter.create(restClient);
|
||||
HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(adapter).build();
|
||||
|
||||
RepositoryService service = factory.createClient(RepositoryService.class);
|
||||
----
|
||||
|
||||
`@HttpExchange` is supported at the type level where it applies to all methods:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
|
|
Loading…
Reference in New Issue