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

Bean named 'moneyRecordDao' must be of type [com.fuscent.core.dao.MoneyRecordDao], but was actually of type [com.yooli.currentproduct.dao.impl.MoneyRecordDaoImpl]

感觉自己弱爆了啊.

No matching bean of type [xx] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency的更多相关文章

  1. 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 ...

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

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

  3. 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 ...

  4. 多个@bean无法通过@resource注入对应的bean(org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'javax.sql.DataSource' available: expected single matching bean but found )

    一.异常 org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type ' ...

  5. 解决:Field xxMapper in xx.service.impl.xxServiceImpl required a bean of type 'xx.mapper.xxMapper'

    1.启动 SpringBoot项目报错,使用的是Springboot.Spring.Mybatis连接Mysql数据库,启动SpringBoot项目报错,错误如下所示: _____ .__/\ .__ ...

  6. 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问题.解决后在此记录一下. 解 ...

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

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

  8. Consider defining a bean of type 'XX.XX.XX.XX.mapper.XXMapper' in your configuration.

    今天构建一个springboot 项目,采用mybatis+mysql 然后就出现了这种错误....浪费我半天时间 Description: Field loginLogMapper in com.g ...

  9. 运行springboot项目报错:Field userMapper in XX required a bean of type 'xx' that could not be found.

    运行springboot项目报错: *************************** APPLICATION FAILED TO START ************************** ...

随机推荐

  1. 修改host文件屏蔽视频广告和网站

    很多时候我们会需要屏蔽一些网站或者广告,类似XX网站,下木马病毒的网站,或者破解软件的时候.我们可以使用一些软件屏蔽,我这里是用windows系统自带的hosts文件来屏蔽的.这个文件有点类似精简版的 ...

  2. jquery轻松操作CSS样式

    $(this).click(function(){  if($(this).hasClass(“zxx_fri_on”)){    $(this).removeClass(“zxx_fri_on”); ...

  3. 【转】IOS静态库a文件制作流程

    原文网址:http://www.jianshu.com/p/3439598ea61f 1.新建Cocoa Touch Static Library工程 新建工程 2.Xcode的参数设置 " ...

  4. 简单播放系统提示音 android

    //Uri alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM); //alert = RingtoneManager.g ...

  5. How to drop a PostgreSQL database if there are active connections to it?

    1.PostgreSQL 9.1 and below: SELECT pg_terminate_backend(pg_stat_activity.procpid) FROM pg_stat_activ ...

  6. MySQL执行计划显示与执行过程不符合一例

    一 建表和现象的过程如下 CREATE TABLE t1 (id1 INT, a1 INT, b1 INT, PRIMARY KEY(id1));CREATE TABLE t3 (id3 INT UN ...

  7. MyBatis java and MySql local variables

    <insert id="create" parameterType="models.entities.CategoryEntity"> set @c ...

  8. Debian环境下vi设置

    下面给出一个vi编辑器的配置文件,可以放到用户目录的.vimrc文件中: "========================================================= ...

  9. HTML <div> 和 <span>

    可以通过 <div> 和 <span> 将 HTML 元素组合起来. HTML 块元素 大多数 HTML 元素被定义为块级元素或内联元素. 编者注:“块级元素”译为 block ...

  10. 关于SqlServer的DBHelper类以及数据分页

    前端: <My:AspNetPager class="arPage" PageSize="20" UrlPaging="true" r ...