解决SpringBoot中 No qualifying bean of type ‘com.yifeng.study.dao.UserMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}报错

问题描述

解决SpringBoot中 No qualifying bean of type 'com.yifeng.study.dao.UserMapper' available:...报错

原因

没有扫描到mapper包

解决办法

在主启动类上添加扫描mapper包的注解。
解决SpringBoot中 No qualifying bean of type 'com.yifeng.study.dao.UserMapper' available:...报错

相关文章:

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