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

posted @ 2020-02-20 15:44  厸清扬  阅读(11626)  评论(0编辑  收藏  举报