A component required a bean of type 'com.example...' that could not be found解决办法


工程启动报错
A component required a bean of type ‘com.example…’ that could not be found

 

解决办法一:
1、再启动类添加mapper包扫描注解即可
@MapperScan(“com.example.firstspringboot.dao”)
在这里插入图片描述

解决办法二:
在每个mapper接口上添加@mapper注解
在这里插入图片描述

 

转载自:https://blog.csdn.net/qq_34206683/article/details/86179789


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM