在學習Spring-boot-mybatis時,報錯A component required a bean of type 'com.sirifeng.testmybatis.mapper.BookMapper' that could not be found.
后來發現是在啟動器上沒有添加注解
@MapperScan("com.sirifeng.testmybatis.mapper")
如有這個錯誤的可以看一下是不是因為這個原因。
在學習Spring-boot-mybatis時,報錯A component required a bean of type 'com.sirifeng.testmybatis.mapper.BookMapper' that could not be found.
后來發現是在啟動器上沒有添加注解
@MapperScan("com.sirifeng.testmybatis.mapper")
如有這個錯誤的可以看一下是不是因為這個原因。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。