Describe the bug
When RestCient is initialized by a RestTemplate using RestClient.builder(restTemplate) the interceptors are executed 2 times.
To Reproduce
Create a RestTemplate with an interceptor (loggingInterceptor to make it simple).
Initialize a RestClient and then perform a call restClient.get().uri(uri).retrieve().body(YourObject.class)
LoggingInterceptor will be executed 2 times because 2 ClientHttpRequestInterceptor object are created. (Please find attached)
Expected behavior
The interceptor must be executed once
Describe the bug When RestCient is initialized by a RestTemplate using RestClient.builder(restTemplate) the interceptors are executed 2 times.
To Reproduce Create a RestTemplate with an interceptor (loggingInterceptor to make it simple). Initialize a RestClient and then perform a call restClient.get().uri(uri).retrieve().body(YourObject.class) LoggingInterceptor will be executed 2 times because 2 ClientHttpRequestInterceptor object are created. (Please find attached)
Expected behavior The interceptor must be executed once