Could not autowire. No beans of ‘BookMapper‘ type found.
Could not autowire. No beans of ‘BookMapper’ type found.
解决方法:
第一种:在IDEA中设置一下,
Settings - Editor - Inspections - Spring - Spring Core - Code - Autowiring for Bean Class - disable 把勾去掉即可,如下图:
第二种:
在BookMapper类内添加注解@Component
问题解决!!!
还没有评论,来说两句吧...