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

时间:2020-02-20 16:16:59   收藏:0   阅读:1379

工程启动报错
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

原文:https://www.cnblogs.com/LinQingYang/p/12335979.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!