Could not autowire. No beans of ‘BookMapper‘ type found.

蔚落 2022-12-01 11:42 283阅读 0赞

Could not autowire. No beans of ‘BookMapper’ type found.
在这里插入图片描述

解决方法:
第一种:在IDEA中设置一下,
Settings - Editor - Inspections - Spring - Spring Core - Code - Autowiring for Bean Class - disable 把勾去掉即可,如下图:
在这里插入图片描述
第二种:
在BookMapper类内添加注解@Component
问题解决!!!

发表评论

表情:
评论列表 (有 0 条评论,283人围观)

还没有评论,来说两句吧...

相关阅读