IDEA报错Could not autowire. No beans of 'xxxx' type found解决方法
分类:
文章
•
2024-09-16 13:26:04
壹 | 问题描述
- 今天在做ssm项目过程中,突然发现service实现类中持久层接口没有办法自动注入,显示:Could not autowire. No beans of ‘IProductDao’ type found。如下图:
贰 | 解决办法
- 在持久层接口上添加@Repository即可。
叁 | 问题解决
- service接口实现类中,持久层接口注入成功。
完成。