How can I change the feign URL during the runtime?

You can add an unannotated URI parameter (that can potentially be determined at runtime) and that will be the base path that will be used for the request. E.g.: @FeignClient(name = “dummy-name”, url = “https://this-is-a-placeholder.com”) public interface MyClient { @PostMapping(path = “/create”) UserDto createUser(URI baseUrl, @RequestBody UserDto userDto); } And then the usage will be: … Read more

Feign logging not working when alter level

You need to configure logging in application.properties as below: logging.level.<package path>.MyClient=DEBUG If you’re using application.yml then: logging.level.<package path>.MyClient: DEBUG The log level can be set to tell Feign how much to log. Options are: NONE, No logging (DEFAULT) BASIC, Log only the request method and URL and the response status code and execution time HEADERS, … Read more

What are the advantages and disadvantages of using feign over RestTemplate

Feign allows you to abstract the mechanics of calling a REST service. Once you configure and annotate the Feign interface, you can call a REST service by making a simple Java function call. The actual implementation of making a REST call is handled at runtime by Feign. This means that the implementation can be configured … Read more