BeanCreationException:Does the parameter type of the setter match the return type of the getter
来源:互联网 发布:福建广电网络书记 编辑:程序博客网 时间:2024/05/16 06:00
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao' defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' of bean class [dxm.com.dao.imp.UserDaoImp]: Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1429)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
========================
根据 错误信息提示 显然是 sessionFactory没有get, set方法。加上就ok啦。get方法无所谓,set方法必须有,spring注入注入!!set方法是注入的通道。从方法体就可以看出来。
public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
0 0
- BeanCreationException:Does the parameter type of the setter match the return type of the getter
- Does the parameter type of the setter match the return type of the getter?
- Does the parameter type of the setter match the return type of the getter?
- 【错误】Does the parameter type of the setter match the return type of the getter
- Does the parameter type of the setter match the return type of the getter? 异常处理
- Spring框架使用 错误:Does the parameter type of the setter match the return type of the getter?
- Spring setter match the return type of the getter Spring 命名规范问题
- Bean property 'dao' is not writable or has an invalid setter method. Does the parameter type of the
- Bean property 'RegDao' is not writable or has an invalid setter method. Does the parameter type of t
- Bean property 'esyerDao' is not writable or has an invalid setter method. Does the parameter type of
- Bean property 'address' is not readable or has an invalid getter method: Does the return type of th
- How does the Spring MVC determine the type of a given request parameter
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the insta
- Description Resource Path Location Type Java compiler level does not match the version of the insta
- Description Resource Path Location Type Java compiler level does not match the version of the insta
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- mac_MySQL安装
- 第14题
- 第二章作业P51.20(设某县2000年工业总产值为200亿元,如果该县预计平均年工业总产值增长率为0.045%,那么多少年后该县年工业生产总值将超过500亿?)
- android集成推送和消息响应
- AFNetworking2.0源码解析<一>
- BeanCreationException:Does the parameter type of the setter match the return type of the getter
- dede怎样调用单个图集包含多少张图片的张数
- Unable to execute dex: Multiple dex files define 解决方法
- 7. Decorator pattern(装饰器模式)
- Redis的学习之管道
- Dubbo zookeeper 初探
- POJ 2411Mondriaan's Dream
- AFNetworking2.0源码解析<二>
- memory hierachy