I am having trouble auto wiring a feign client from another project. It appears that the implementation of the feign client is not being generated and injected.
This
Direct Class/Interface name can be given like below
@EnableFeignClients(basePackageClasses=com.abc.xxx.client.XXFeignClient.class)
This parameter accept single or multiple class name
You need to tell the Feign scanner where to locate the interfaces.
You can use @EnableFeignClients(basePackages = {"my.external.feign.client.package", "my.local.package"})
.
My main class was in package "com.abc.myservicename" and my main class name was "myservicename.java". I was using @SpringBootApplication(scanBasePackages="com.abc") annotation in my main class.
Changing the main class package name to "com.abc" has resolved the issue for me.