整合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)
出错原因:(缺少注解)
解决办法:
整合SSH时,遇到了org.springframework.beans.factory.BeanCreationException错误的更多相关文章
- ssh整合报错严重: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxx'
错误描述:eclipse整合ssh的时候 报不能创建名字为xxx的对象 信息: Destroying singletons in org.springframework.beans.factory.s ...
- spring3+structs2整合hibernate4时报org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void sy.dao.impl.UserDaoImpl.setSessionFactory(org.hibernate.SessionFactory);
今天在spring3+structs2整合hibernate4时报如下错误,一直找不到原因: org.springframework.beans.factory.BeanCreationExcepti ...
- Tomcat 启动时项目报错 org.springframework.beans.factory.BeanCreationException
事情是这样的,最近我们公司需要将开发环境和测试环境分开,所以就需要把所有的项目部署一套新的开发环境. 我们都是通过 Jenkins 进行部署的,先说一下两个环境的配置: 测试环境配置(旧):jdk1. ...
- struts2和spring整合错误 org.springframework.beans.factory.BeanCreationException,已解决
先贴上错误 2018-8-16 23:41:10 org.springframework.context.support.ClassPathXmlApplicationContext prepareR ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserDao' def
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserDao' def ...
- 【解决方案】 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userHandler': Injection of resource dependencies failed;
一个错误会浪费好多青春绳命 鉴于此,为了不让大家也走弯路,分享解决方案. [错误代码提示] StandardWrapper.Throwableorg.springframework.beans.fac ...
- Caused by: org.springframework.beans.factory.BeanCreationException
1.错误原因 2014-7-13 17:36:57 org.apache.jasper.compiler.TldLocationsCache tldScanJar 信息: At least one J ...
- Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field
1 错误描述 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.s ...
- org.springframework.beans.factory.BeanCreationException 解决异常错误
一月 18, 2017 10:18:51 上午 org.apache.coyote.http11.Http11Protocol initINFO: Initializing Coyote HTTP/1 ...
随机推荐
- 写一个类时什么时候需要重写toString
一般需要打印出来的时候需要重写toString方法 例如:User.java类 public class User { private String name; @Value(value=" ...
- windows平台安装并使用MongoDB
下载并安装MongoDB,我的安装路径:D:\Program_Files\MongoDB 创建数据库目录,我的目录:D:\mongodb\data\db 命令行下运行MongoDB服务器: 在命令行窗 ...
- 快速部署MongoDB
MongoDB是一个基于分布式文件存储的数据库.由C++语言编写.旨在为WEB应用提供可扩展的高性能数据存储解决方案.本文安装的版本为3.0,其他版本可对照. 设置mongodb repo vi /e ...
- my dream
我的梦想(践踏一切可以践踏的,放弃一切必须放弃的,然后朝着自己认为的方向努力,只要自己认为对了就可以了(但是最好能考虑方面全一点,这就叫尽力了)我想要的生活怎么那么醉我想要的食物怎么那么碎我最爱的女孩 ...
- 版本控制之三:SVN合并及解决冲突(转)
转自 http://www.cnblogs.com/xiaobaihome/archive/2012/03/20/2408089.html 接下来,试试用TortoiseSVN修改文件,添加文件,删除 ...
- POJ3264 (RMQのST解法)
For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One d ...
- Coins(多重背包+二进制优化)
Problem Description Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. On ...
- javascript中数组与字符串之间的转换以及字符串的替换
数组转化为字符串: var a=['aa','bb','cc']; var b=a.join('-'); console.log(b)----->'aa-bb-cc' 字符串中的替换: 1.re ...
- [java基础] java 左移和右移
今天搜到一个比较好用的在线编译器,希望和大家分享. 除了java还有c++....,地址是http://www.tutorialspoint.com/compile_java_online.php 另 ...
- 微信小程序入门(一)
想必当你对官方文档了解地差不多的时候,一颗跃跃欲试的心就开始骚动了吧. 开发小程序之前的准备工作: 1).准备一个域名 2).准备一台云服务器 3).搭建小程序的后台,博主的小程序后台请求的的是自己写 ...