If there is no @SpringBootApplication, can @EnableFeignClients work?

Viewed 41

I have a project which has no @SpringBootApplication in use, I want to use feign client, and I used @EnableFeignClients, but I got the error of "No qualifying bean of type" for the feign client, are there any workarounds?

1 Answers

Yes, but you have to add:

@EnableAutoConfiguration: enable Spring Boot’s auto-configuration mechanism
@ComponentScan: enable @Component scan on the package where the application is located
Related