-
Notifications
You must be signed in to change notification settings - Fork 810
Description
I can do @FeignClient(contextId = "fooClient", name = "stores", configuration = FooConfiguration.class)
.
But if I create the clients manually via FeignClientBuilder (uses ApplicationContext) then I can't see a way to override stuff from FeignClientsConfiguration like an encoder.
I see that there is a FeignContext class, and the concept of NamedContextFactory but there is no way to use it, as I don't have access to the getContext method to register my stuff, nor to implement my own FeignClientSpecification.
Since it's there already, I don't think it's a feature request.
My concrete use case is that I have several vendor integrations at the same time, and each vendor has several feign clients with different credentials. One vendor has a custom encoder, and each has a custom decoder to throw custom exceptions. I create each client at runtime by using a FeignClientBuilder. It would've been a little cleaner if I extracted these customizations into FeignClientSpecification for each vendor rather than having them in code.