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

Project started error
A component required a bean of type ' com.example ...' that could not be found

 

Solution one:
1, and then start scanning packet mapper class to add annotations to
@MapperScan ( "com.example.firstspringboot.dao")
Here Insert Picture Description

Solution two:
Add @mapper notes on each mapper interfaces
Here Insert Picture Description

 

Reprinted from: https://blog.csdn.net/qq_34206683/article/details/86179789

Guess you like

Origin www.cnblogs.com/LinQingYang/p/12335979.html