springcloud Feign使用时,某服务A调用服务B的类时,找不到

徘徊边缘 提交于 2020-02-28 04:12:43

 

 

 

 


***************************
APPLICATION FAILED TO START
***************************

Description:

Field productClient in com.imooc.order.service.impl.OrderServiceImpl required a bean of type 'com.imooc.product.client.ProductClient' that could not be found.


Action:

Consider defining a bean of type 'com.imooc.product.client.ProductClient' in your configuration.

 

 

这是因为没有扫描到这些类,

@EnableFeignClients(basePackages = "com.imooc.product.client")

应该有这功能的,但没起到效果,所以又加上了如下
 

@ComponentScan(basePackages = "com.imooc.product.client")

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!