原因:A模块和B模块的包路径问题
例如:
A模块包com.xs.content
B模块包com.xs
A模块的serviceImpl中去调用--B模块的service层代理对象,但是却报:- @org.springframework.beans.factory.annotation.Autowired(required=true)
解决办法:在解决办法@SpringBootApplictaion(scanBasePackages="com.xs)
使它们的路径都是com.xs都可以一起扫描到
来源:(16条消息) SpringBoot 多模块项目(module)Service自动注入(@Autowired)_不同module的autowired_蛋蛋专属的博客-CSDN博客