1.查看接口实现类是否加入注解,如service、repository等

2.查看spring配置文件是否自动扫描包    <context:component-scan base-package="xxx.xx.xxx">

3.查看是否在web.xml中加载spring容器

4.service是否有实现impl

【java异常】expected at least 1 bean which qualifies as autowire candidate for this depende的更多相关文章

  1. Caused by:org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type "" available: expected at least 1 bean which qualifies as autowire candidate

    项目使用spring, mybatis.因为分了多个模块,所以会这个模块引用了其它模块的现在,结果使用Junit测试的时候发现有两个模块不能自动注入dao和service问题.解决后在此记录一下. 解 ...

  2. spring加载bean报错:expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

    看具体报错日志: 警告: Unable to proxy interface-implementing method [public final void cn.wlf.selection.proto ...

  3. NoSuchBeanDefinitionException:No qualifying bean of type found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency.

    报错如下: NoSuchBeanDefinitionException:No qualifying bean of type   found for dependency: expected at l ...

  4. springboot available: expected at least 1 bean which qualifies as autowire candidate奇葩问题

    Exception encountered during context initialization - cancelling refresh attempt: org.springframewor ...

  5. No matching bean of type [xx] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency

    这个看起来很弱爆的问题其实是因为其他的配置文件中已经出现了为xx定义好的注入.如果用@Autowired就会得到上面的错误 , 但是用@Resource的时候就会看到类似下面的错误 Bean name ...

  6. mybatis expected at least 1 bean which qualifies as autowire candidate for this dependency

    错误原因:没有引入相应mapper接口,导致spring没有找到依赖 解决方法一:使用注解的方法: 首先在spring配置文件中添加 <bean class="org.mybatis. ...

  7. NoSuchBeanDefinitionException: No qualifying bean of type 'com.bj186.ssm.mapper.EmployeeMapper' available: expected at least 1 bean which qualifies as autowire candidate

    在搭建SSM spring springmvc  mybatis整合的时候, 遇到了这个问题 说说我的问题吧!我在进行单元测试的时候,出现了这个错误,网上一查才知道是,配置文件中没有写扫描包信息.一看 ...

  8. org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.oskyhang.gbd.service.UserService] found for dependency: expected at least 1 bean which qualifies as aut

    spring中一个符号的错误居然让我浪费了四五个小时才找出来,不得不给自己了两个耳光.. 由于新建项目与原来项目的目录结构有所不同,copy过来的配置文件,有些地方修改的不彻底,导致spring扫描注 ...

  9. Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.thinkplatform.dao.UserLogDao' available: expected at least 1 bean which qualifies as autowi

    我出错的问题是: 检查:

随机推荐

  1. Kafka为什么速度那么快?

    Kafka为什么速度那么快? Kafka的消息是保存或缓存在磁盘上的,一般认为在磁盘上读写数据是会降低性能的,因为寻址会比较消耗时间,但是实际上,Kafka的特性之一就是高吞吐率. 即使是普通的服务器 ...

  2. 检查hdfs块的块-fsck

    hadoop集群运行过程中,上下节点是常有的事情,如果下架节点,hdfs存储的块肯定会受到影响. 如何查看当前的hdfs的块的状态 hadoop1.x时候的命令,hadoop2.x也可使用: hado ...

  3. git add命令行添加文件、文件夹以及撤销文件add的方法

       1.添加某个文件类型到暂存区,比如所有的 .html 文件. git add *.html    2.添加某个文件或者某个文件夹中的某个文件到暂存区 ,比如 index 下的 index.htm ...

  4. 一个简单 System.Threading.Tasks.Dataflow.TransformBlock 示例

    直接贴代码了: using System; using System.Collections.Generic; using System.IO; using System.Threading.Task ...

  5. logstash之mongodb-log

    1.logstash6.5.3 配置收集mongodb的日志: 首先在mongodb服务器上部署filebeat收集日志并上传到logstash进行处理,然后上传到ES. filebeat-conf: ...

  6. centos安装sftp服务

    一.创建sftp服务数据目录及相关测试用户 [root@localhost ~]# mkdir -pv /data/sftp/ #sftp数据目录 [root@localhost ~]# chown ...

  7. GT性能测试Android版使用说明

    1 GT简介 GT(随身调) Android版是腾讯 MIG 专项测试组自行研发的 Android APP 随身调测平台,它是直接运行在手机上的“集成调测环境”(ITE, Integrated Tes ...

  8. Delphi 10.3.2 社区版的安装

    1.去 https://www.embarcadero.com/cn/products/delphi/starter 下载安装程序 首先你要有一个embarcadero社区账号,国内线路下载有点慢,下 ...

  9. Linux 笔记 - 第二十四章 配置 Tomcat

    一.前言 Tomcat 是 Apache 软件基金会(Apache Software Foundation)Jakarta 项目中的核心项目,由 Apache.Sun 和其他一些公司及个人共同开发.使 ...

  10. C# while循环

    一.简介 只要给定条件为true,C#的while循环语句会循环重新执行一个目标的语句. 二.语法 C# while的语法: while(循环条件) { 循环体: } 三.执行过程 程序运行到whil ...