zoukankan      html  css  js  c++  java
  • 整合SSH时,遇到了org.springframework.beans.factory.BeanCreationException错误

    严重: StandardWrapper.Throwable
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userLoginController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.chenk.service.UserLoginService com.chenk.web.controller.UserLoginController.userService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.chenk.service.UserLoginService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

    出错原因:(缺少注解)

    解决办法:

    作  者: Jony.K.Chen
    出  处:http://www.cnblogs.com/lxcy/
    版权声明:本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接。
    特此声明:所有评论和私信都会在第一时间回复。也欢迎园子的大大们指正错误,共同进步。
    声援博主:如果您觉得文章对您有帮助,可以点击文章右下角推荐一下。您的鼓励是作者坚持原创和持续写作的最大动力!

  • 相关阅读:
    记MongoDB的安装
    Python格式化输出指定宽度及占位符
    LMDB数据库加速Pytorch文件读取速度
    IDEA设置输入后自动提示
    IDEA2020 最新激活
    java 编译执行cmd命令
    算法9:What is the sum of the digits of the number 21000
    JAVA8 LocalDateTime
    算法8:已知 a^2+b^2=c^2(a,b,c 为自然数,a<b<c),且a+b+c=1000,求abc的值?
    ROS学习笔记
  • 原文地址:https://www.cnblogs.com/lxcy/p/7989794.html
Copyright © 2011-2022 走看看