Closed hpoettker closed 10 months ago
Thanks for creating the issue, @hpoettker. We're currently working on it.
Hi @OlgaMaciaszek . I see you have added support for the @LoadBalanced annotation and updated the documents.
But I can't find a way how I can use autoconfiguration Builder and @LoadBalanced together.
Due to the use of micrometer tracing and eureka in the project. And if I use autoconfiguration, then only micrometer works, or when I use @LoadBalanced, then all autoconfiguration is disabled and only LB works
I just want to get a stateless constructor with all the autoconfiguration or something like that:
@LoadBalanced
@Bean
public RestClient restClient (RestClient.Builder restClientBuilder)
{
return restClientBuilder.build();
}
Then the builder will still remain stateless and will be automatically configured. And we got all the autoconfigurations + LB
Status Quo
The Spring Cloud Load Balancer currently offers auto-configuration for
RestTemplate
andWebClient
.I assume the
LoadBalancerInterceptor
andRetryLoadBalancerInterceptor
will work with the newRestClient
in the same way as with theRestTemplate
. But there currently is no auto-configuration forRestClient
available.Feature Request
Add configuration support with annotations like
@LoadBalanced
for theRestClient
.