开始学习java了,这几天也是在不断踩坑。记录下成长吧。

 

问题:运行springboot程序的时候,报了下面的错误。

Field usersMapper in com.example.test.impl.UsersServiceImpl required a bean of type ‘com.example.tes

原因:未扫描到 mapper 包。

解决:在项目启动类上加注解 @MapperScan

Field usersMapper in com.example.test.impl.UsersServiceImpl required a bean of type ‘com.example.tes

重新启动项目即可

相关文章:

  • 2021-10-21
  • 2021-08-22
  • 2021-04-02
  • 2022-12-23
  • 2021-09-13
  • 2021-05-29
猜你喜欢
  • 2021-07-21
  • 2021-08-02
  • 2021-12-05
  • 2021-06-06
  • 2021-12-09
  • 2021-05-08
  • 2021-12-26
相关资源
相似解决方案