zoukankan      html  css  js  c++  java
  • Error creating bean with name 'unMblTotController': 注入失败

    今天新来的小伙子,进公司做项目,然后自己新建了包,出了以下错误

    y.UnsatisfiedDependencyException: Error creating bean with name 'unMblTotController': 
    Unsatisfied dependency expressed through field 'dataService'; nested exception is org.springframework.beans.
    factory.UnsatisfiedDependencyException: Error creating bean with name 'unMblTotServiceImpl': Unsatisfied dependency expressed
     through field 'unMblTotMapper'; 
     nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean found for dependency 
     [com.yd.ydsetl.unmbl.mapper.UnMblTotMapper]: expected at least 1 bean which qualifies as autowire candidate.
    Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

    错误的意识,controller,service,dao注入失败,

    那么可以说明是配置上的问题,跟代码上没有关系,

    可以知道应该是包扫描上出现问题了,出现了命名的问题,

    我们可以找到

    spring-mvc.xml  或者spring.xml.还有spring-dao.xml文件去查看相关的包扫描,是否存在相关问题,

    新来小哥,骗过了编译器,但是在运行的时候出现这个错误,说明不是代码,而是相关配置问题,

  • 相关阅读:
    Windows消息循环
    python 如何获得网卡的Ip地址
    curl 如何测量它花了多少时间?
    mininet 如何创建有不同带宽的链路
    Emacs学习笔记:多窗口操作
    RYU 如何扔掉一个符合要求的数据包
    RYU OFPMatch 的使用方法
    __attribute__如何使用的记录
    make file 和 GCC标志学习
    mininet and ovs 总结
  • 原文地址:https://www.cnblogs.com/xiufengchen/p/11309083.html
Copyright © 2011-2022 走看看