org.springframework.beans.NotWritablePropertyException
来源:互联网 发布:淘宝的收藏店铺在哪里 编辑:程序博客网 时间:2024/05/21 17:21
问题:
org.springframework.beans.NotWritablePropertyException:Invalid property 'recommendBusinessLogic' of bean class[cn.cnr.cms.api.resource.v1.specialTopic.SpecialTopicResource]: Bean property'recommendBusinessLogic' is not writable or has an invalid setter method. Doesthe parameter type of the setter match the return type of the getter?
解决:
我的ctx-api-resource.xml文件的相关如下:
<bean id="specialTopicResource"
class="cn.cnr.cms.api.resource.v1.specialTopic.SpecialTopicResource"
scope="singleton">
<property name="specialTopicConversionServiceFacade" ref="specialTopicConversionServiceFacade" />
<property name="specialTopicBusinessLogic" ref="specialTopicBusinessLogic" />
<property name="recommendBusinessLogic" ref="recommendBusinessLogic" />
<property name="labelBusinessLogic" ref="labelBusinessLogic" />
</bean>
bean里有4个property,而在class文件(即"cn.cnr.cms.api.resource.v1.specialTopic.SpecialTopicResource")里只有前2个的getter和setter,补足即可。
总结:bean里的property有几个,class文件就必须声明几个的getter和setter!
- org.springframework.beans.NotWritablePropertyException
- org.springframework.beans.NotWritablePropertyException
- org.springframework.beans.NotWritablePropertyException
- org.springframework.beans.NotWritablePropertyException
- org.springframework.beans.NotWritablePropertyException
- org.springframework.beans.NotWritablePropertyException
- org.springframework.beans.NotWritablePropertyException
- org.springframework.beans.NotWritablePropertyException
- org.springframework.beans.NotWritablePropertyException解析
- org.springframework.beans.NotWritablePropertyException 错误
- org.springframework.beans.NotWritablePropertyException: Invalid property... 问题解决
- spring 错误(org.springframework.beans.NotWritablePropertyException)
- org.springframework.beans.NotWritablePropertyException,请高人指点...
- 关于 org.springframework.beans.NotWritablePropertyException 的处理
- Caused by: org.springframework.beans.NotWritablePropertyException
- nested exception is org.springframework.beans.NotWritablePropertyException:
- org-springframework-beans-NotWritablePropertyException--Invalid property 问题
- spring 错误(org.springframework.beans.NotWritablePropertyException)依赖注入配置
- 安卓探究ListView+Adapter数据在工作线程中更新引发的crash以及解决方法(二)
- 时间戳整理
- js 正则
- Osgi的简单实现
- 学习C++ effective
- org.springframework.beans.NotWritablePropertyException
- 移动网络策略
- Hadoop 2.4.0+zookeeper3.4.6+hbase0.98.3分布式集群搭建
- java中正则表达式工具类:Pattern和Macher
- “玲珑杯”郑州轻工业学院第八届ACM程序设计大赛暨河南高校邀请赛-正式赛
- 关于androidstudio创建新项目之后
- Eclipse4.3 + weblogic10.3调试配置
- 自定义横向Progressbar
- Messenger的使用