工程启动报错
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”)
A component required a bean of type 'com.example...' that could not be found解决办法

解决办法二:
在每个mapper接口上添加@mapper注解
A component required a bean of type 'com.example...' that could not be found解决办法

 

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

相关文章: