SpringBoot踩坑--No qualifying bean of type ‘XXX.XXX.XXX.dao.XXXDao‘ available
SpringBoot踩坑--No qualifying bean of type 'XXX.XXX.XXX.dao.XXXDao' availableSpringBoot项目出现的异常提示如下:No qualifying bean of type 'com.zxq.api.dao.UserDao' available: expected at least 1 bean which qualifie
·
SpringBoot踩坑--No qualifying bean of type 'XXX.XXX.XXX.dao.XXXDao' available
SpringBoot项目出现的异常提示如下:
No qualifying bean of type 'com.zxq.api.dao.UserDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
当然,也可能会给我们报从Dao层到Controller层的一系列异常。出现这种问题的原因可能包括以下两种:
1.ServiceImpl层缺少@Service注释
2.没有在项目的主文件application.java中加入@MapperScan(basePackages = “XXX.XXX.XXX.dao”)
更多推荐
已为社区贡献2条内容
所有评论(0)