`

org.springframework.beans.NotWritablePropertyException: Invalid property '' of b

阅读更多
org.springframework.beans.NotWritablePropertyException: Invalid property '' of bean class?2009-02-13 15:22
  出现异常的原因是在application-xxx.xml中property name的错误。

  <property name="...."> 中name的名字是与bean的set方法相关的,而且要注意大小写。

  比如

public class PostManageImpl extends BaseManage implements PostManage {
 private PostDAO dao = null;
 public void setPostDAO(PostDAO postDAO){
  this.dao = postDAO;
 }
} 

  那么xml的定义应该是:

<bean id="postManage" parent="txProxyTemplate">
<property name="target">
 <bean class="com.yz.spring.service.implement.PostManageImpl">
  <property name="postDAO"><ref bean="postDAO"/></property> 对
  <property name="dao"><ref bean="postDAO"/></property> 错
 </bean>
</property>
</bean> 
 

 

分享到:
评论

相关推荐

    org.springframework.web.servlet-3.0.1.RELEASE-A.jar

    nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'error_view' of bean class [com.demo.controller.action.AuthorAction]: Bean property 'error_view' is not ...

    org.springframework.transaction-3.1.2.RELEASE.zip

    nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'transactionManagerBeanName' of bean class [org.springframework.transaction.interceptor....

    dubbo-admin 管理后台2.5.4 for JDK8

    大家可以直接使用 Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property ...

    Dubbo管理控制台(兼容JDK8)

    Dubbo管理控制台(兼容JDK8)

    支持jdk8版本dubbo-admin

    org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable ...

    Dubbo管理控制台dubbo admin2.X for jdk8 (window,liunx)

    如果是在JDK8下跑,会报错: org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean ...

    dubbo-admin-2.5.8.war(编译环境JDK8)

    org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable or...

    dubbo_admin-2.54.war和dubbo_admin_2.54forJDK8

    org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable ...

Global site tag (gtag.js) - Google Analytics