在学习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")


如有这个错误的可以看一下是不是因为这个原因。

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-01
  • 2021-04-21
  • 2022-01-21
  • 2021-08-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-29
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
  • 2021-09-11
相关资源
相似解决方案