No qualifying bean of type ‘com.kkb.dao.*Mapper‘ available

Posted 奔跑的路奇

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了No qualifying bean of type ‘com.kkb.dao.*Mapper‘ available相关的知识,希望对你有一定的参考价值。

没有查找到 *mapper对象

程序报错没有查找到 mapper对象
在这里插入图片描述
可能造成的原因:缺少相应的注解
在SpringBoot的启动类中缺少 @MapperScan

@SpringBootApplication
@MapperScan("com.yhp.dao")
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

在这里插入图片描述

以上是关于No qualifying bean of type ‘com.kkb.dao.*Mapper‘ available的主要内容,如果未能解决你的问题,请参考以下文章

No qualifying bean of type报错问题处理

No qualifying bean of type '***' available: expected at least 1 bean which qualifies as auto

No qualifying bean of type ‘com.bruceliu.mapper.UserMapper‘

spring注入时报错::No qualifying bean of type 'xxx.xxMapper'

No qualifying bean of type ‘com.kkb.dao.*Mapper‘ available

No qualifying bean of type ‘com.kkb.dao.*Mapper‘ available