Could not autowire. No beans of ‘xxxMapper’ type found.的三种解决办法
出现Could not autowire. No beans of ‘xxxMapper’ type found.的解决办法
![问题描述](https://img-blog.csdnimg.cn/188abddb3cda42b4ac07253a49ef2db3.png#pic_center)
法一:在Mapper接口文件上添加@Repository注解,代表数据访问
法二:添加@Component注解,相当于写入配置文件<bean id ="" class=""/>
法三:删除@Autowired注解,使用@Resource注解。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)