在Springboot启动的时候报错误:
No qualifying bean of type 'com.gzhc365.mix.http.api.HttpApi' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
原因:报红波浪线,找不到名为'HttpApi'的bean
本人的解决方案:
Springboot启动类加上这个注解:
@EnableFeignClients(basePackages = {"com.gzhc365.mix.http.api"})
扫描com.gzhc365.mix.http.api路径下的HttpApi
波浪线消除,成功找到HttpApi这个bean