Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow definition of WebClient.Builder in custom configuration referenced in @RetrofitClient or @EnableRetrofitClients #52

Open
michael-wirth opened this issue Jul 16, 2022 · 1 comment

Comments

@michael-wirth
Copy link

Not sure if this is a bug or a missing feature. The WebClient.Builder can't be defined in a custom Configuration defined in a child applicationcontext for each RetrofitClient.

Describe the solution you'd like

  • declare WebClient.Builder in a custom Configuration and lookup the bean in the child applicationcontext
  • support bean aliases to use the same WebClient.Builder in multiple RetrofitClient

Describe alternatives you've considered
none

@OlgaMaciaszek
Copy link
Collaborator

Hello @michael-wirth, this is a model we've had for any similar child-context- based implementations, such as SC OpenFeign and SC LoadBalancer and we've never had any requests for this, which, by itself, is not a reason to not to add this feature. However, there's a feature parity issue between the load-balanced and non-load-balanced version here. A @LoadBalanced WebClient.Builder could not be declared here, cause it would not be properly processed by [LoadBalancerWebClientBuilderPostProcessor](https://github.com/spring-cloud/spring-cloud-commons/blob/main/spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/reactive/LoadBalancerWebClientBuilderBeanPostProcessor.java) and clients would not resolved URLs from serviceIds. I don't think should add a feature that would only work on non-loadbalanced version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants