springCould整合feign提示required a bean of type xxx that could not be found
·
谷粒商城项目:
启动时报错了
Field wareSkuService in com.atguigu.gulimall.ware.service.impl.PurchaseServiceImpl required a bean of type 'com.atguigu.gulimall.ware.feign.ProductFeignService' that could not be found.
解决方案:
启动类中使用注解@EnableFeignClients:扫描和注册feign客户端的bean定义,并且加上包名
@EnableFeignClients(basePackages = "com.atguigu.gulimall.ware.feign")

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)