spring&Injection of resource dependencies failed&Bean named 'generalDao' must be of type [com.oracle
来源:互联网 发布:百度钱包 知乎 编辑:程序博客网 时间:2024/05/14 14:09
今天编写小程序时又遇到问题了。。。。
spring 操作数据库 extends hibernateDaoSupport 类,先测试加入 sessionFactory ,正常
然后又加入 transaction ,报错 Injection of resource dependencies failed&Bean named 'generalDao' must be of type [com.oracle
找了半天,注解都加对了呀,而且不存在什么 死循环调用,好烦。
再看看,还是找不到。。。查查吧。。终于发现了!!!!!!!
原来是 service 创建 dao 对象时错了。应该创建一个 接口类 对象,可是我创建了 实现类的
错误代码:
@Resource(name="generalDao")
private GeneralDao generalDao;
正确代码:
@Resource(name="generalDao")
private IGeneralDao generalDao;
0 0
- spring&Injection of resource dependencies failed&Bean named 'generalDao' must be of type [com.oracle
- Injection of resource dependencies failed
- Bean named '*' must be of type [*], but was actually of type [com.sun.proxy.$Proxy34]
- BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type [com.sun.p
- BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type [com.su
- spring注入失败 Injection of resource dependencies failed
- Bean named 'deptDao' must be of type [com.zttech.sys.dao.IGroupDao], but was actually of type [com.s
- BeanNotOfRequiredTypeException:Bean named 'xxx' must be of type [xxxxx]...
- Injection of resource dependencies failed解决办法总结
- Bean named 'testImpl' must be of type [lcw.serviceimpl.testImpl], but was actually of type [com.sun.
- Bean named 'xxx' must be of type xxx , but was actually of type [com.sun.proxy.$Proxy189]
- Getting Spring Error “Bean named 'x' must be of type [y], but was actually of type [$Proxy]” in Jenk
- “Bean named XXX must be of type[XXX], but was actually of type[XXX]”
- Bean named must be of type , but was actually of type
- Bean named '*' must be of type [*], but was actually of type [*] with root case
- “Bean named XXX must be of type[XXX], but was actually of type[XXX]”
- Error creating bean with name 'controller':Injection of resource dependencies failed
- Error creating bean with name 'controller':Injection of resource dependencies failed
- Java中native关键字
- Facebook的开发文档笔记
- python之pandas
- php 过滤掉html标签及标签内的所有内容
- android 停止 终止 Thread 线程的三种方法
- spring&Injection of resource dependencies failed&Bean named 'generalDao' must be of type [com.oracle
- RealSense SDK 中的UnityToolkit
- linux库函数劫持技术
- javascript判断ie版本,判断浏览器
- 缓存技术之redis部署、安装
- android adb使用
- java构造方法私有化
- NOIP常见知识考点
- nginx cache 学习总结