SpringBoot Field aFeign in xxxx required a bean of type 'xxx' that could not be found.

版权声明:原创文章欢迎转载,不过要记得加出处哦 https://blog.csdn.net/wljk506/article/details/83110977

Field aFeign in xxxx required a bean of type ‘xxx’ that could not be found.

SpringBoot 同一个项目,多模块之间调用 报错


APPLICATION FAILED TO START


Description:
Field aFeign in com.hui.data.consumer.controller.ConsumerDemoImpl required a bean of type ‘com.hui.data.provider.api.service.AFeign’ that could not be found.
Action:
Consider defining a bean of type ‘com.hui.data.provider.api.service.AFeign’ in your configuration.

推荐解决方式

调整包结构,把@SpringBootApplication 所在类放在其他包的最外层。
这样同一个项目的其他包就能被SpringBoot 扫描到了
在这里插入图片描述

来源
https://blog.csdn.net/zhouyingge1104/article/details/78267882/

猜你喜欢

转载自blog.csdn.net/wljk506/article/details/83110977