For example:
Application A -> dependency B. B got a @FeignClient
annotated SPI interface, which is @Autowired
depended by classes both in A and B, the SPI is expected to be works fine when application A is started.
Adding @EnableFeignClients
and @SpringBootApplication(scanBasePackages= "path-include-that-SPI-interface")
on A's main class and start, encounters an exception that "Cannot find bean qualified... [SPI interface]".
The solution is configuring scan base-path for @EnableFeignClients
: @EnableFeignClients(basePackages= "path-include-that-SPI-interface")
.