项目场景:【IDEA | @Autowired】出现错误Could not autowire. No beans of ‘xxx’ type found.`
问题描述
在Idea的spring工程里,经常会遇到Could not autowire. No beans of ‘xxxx’ type found的错误提示
APP 中接收数据代码:
在这里插入图片描述
原因分析:
原因可能有两个,第一个是IntellijIDEA本身工具的问题。第二个便是我们导入@Service包的时候导入包错误造成的分析:
1、检查mapper类
2、检查Impl,是否有@Servicez注解
3、检查xml
解决方案:
按照问题分析的步骤检查,问题差不多可以解决