'How to add Feign Client to my AutoConfiguration Spring Starter

I have my couple micro-services "A" and "B". Service "A" should talk with service "B" via REST. In a simple way I create Feign client in service "A" and use it like a proxy to request API of service "B".

But I want to create my own service "B" spring starter with Feign client inside this starter. I want it order to add starter in dependency service "A" and just using ready client service "B".

I have never create my own spring starter and have read couple tutorials and did some success examples. But I stuck when I try to add my Feign client into the AutoConfigure class of my starter.

How to proper add Feign Client Spring Bean to my AutoConfigure class?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source