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/