Are there any way to create FeignClient with dynamic URL runtime?

See original GitHub issue

I want write some Java code to create FeignClient for dynamic URLs(Didn’t want use RestTemplate), but I have no idea. I read the source code, and found maybe FeignClientFactoryBean can do that, but the class was protected.

Are there any way to do that?

My English is not very well, I hope you can understand.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dsyercommented, Apr 26, 2016

It depends what you mean by “dynamic”. Can’t you just use @FeignClient?

0reactions
hnpyhyzcommented, Sep 13, 2017

Hi there, I`ve just come across a similar situation here. May I ask how you made this work?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I change the feign URL during the runtime?
Feign has a way to provide the dynamic URLs and endpoints at runtime. The following steps have to be followed: In the FeignClient...
Read more >
Talk about how to dynamically specify the feign call service ...
Option 1: Transform through feign interceptor + url ; @FeignClient(name = "feign-provider") public ; interface FooFeignClient ...
Read more >
23. Declarative REST Client: Feign - Spring Cloud
Feign is a declarative web service client. It makes writing web service clients easier. To use Feign create an interface and annotate it....
Read more >
Introduction to Spring Cloud OpenFeign - Baeldung
The value argument passed in the @FeignClient annotation is a mandatory, arbitrary client name, while with the url argument, we specify the API ......
Read more >
How to build a REST API client using Feign in Spring Boot
It requires the service's URL, and statically specifying it as shown below is not a good idea, but instead, you would be passing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found