`
wandejun1012
  • 浏览: 2737003 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

has an invalid setter method

    博客分类:
  • java
 
阅读更多

在spring.config.xml中新加入一段:

 

 <!--start yc -->
  <bean id="ycDAOHibernate" class="com.vastis.ext.yc.dao.impl.YCDAOHibernateImpl">
    <property name="sessionFactory">
      <ref local="sessionFactory"/>
    </property>
  </bean>

  <!--mssql 实现类-->
  <bean id="ycDAOJDBC" class="com.vastis.ext.yc.dao.impl.YCDAOJDBCImpl">
   <property name="dataSource">
      <ref local="dataSource"/>
    </property>
  </bean>

  <bean id="ycFacade" parent="JDBCDAOProxy">
    <property name="target">
      <bean class="com.vastis.ext.yc.service.impl.YCFacadeImpl">   
      	<property name="ycDAOHibernate">
          <ref bean="ycDAOHibernate"/>
        </property>    
        <property name="ycDAOJDBC">
          <ref bean="ycDAOJDBC"/>
        </property>
      </bean>
    </property>
  </bean>
  <!--end yc-->

 一开始总提示:

Bean property 'smsHistoryDao' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

折腾了半天,原来错误是在YCFacadeImpl文件中没有对ycDAOJDBC和ycDAOHibernate用get和set方法。

 

但是设了get和set方法后还是没用。

又仔细搜索了一番。

原来是YCDAOHibernateImpl和YCDAOJDBCImpl的继承还是老的接口,将它改成新的接口就可以啦。

 

对spring.config.xml的一些比较好的文章:

1)http://helloaq.iteye.com/blog/218227 含有ref的说明

2)http://hi.baidu.com/lynsahuang/blog/item/4dc04d3982de3123b9998fa4.html

3)http://hi.baidu.com/bigbig_88/blog/item/75ccc6a6e02376f99052eefc.html

4)http://www.cnblogs.com/hubcarl/archive/2011/04/28/2031711.html

分享到:
评论

相关推荐

    dubbo-admin 管理后台2.5.4 for JDK8

    Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable or has an invalid setter method. Does the parameter type ...

    支持jdk8版本dubbo-admin

    property 'URIType' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? 这个问题我也在网上找了很久也没有好的解决方案,最后还是...

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

    Invalid property 'error_view' of bean class [com.demo.controller.action.AuthorAction]: Bean property 'error_view' is not writable or has an invalid setter method. Does the parameter type of the ...

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

    [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of ...

    dubbo_admin-2.54.war和dubbo_admin_2.54forJDK8

    property 'URIType' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? 把其中的spring2的系列JAR包换成了spring3的,就可以在JDK8...

    proxool 0.9.1 修改

    解决在使用spring 配置 proxool 0.9.1时碰到‘houseKeepingSleepTime’is not writeable or has an invalid setter method的问题。 方法是将org.logicalcobwebs.proxool.ProxoolDataSource 中houseKeepingSleepTime...

    proxool jar包

    Invalid property 'houseKeepingSleepTime' of bean class [org.logicalcobwebs.proxool.ProxoolDataSource]: Bean property 'houseKeepingSleepTime' is not writable or has an invalid setter method. Does the ...

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

    dubbo-admin管理控制台安装... Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable or has an invalid setter method.

    org.springframework.transaction-3.1.2.RELEASE.zip

    org.springframework.beans....: Bean property 'transactionManagerBeanName' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

Global site tag (gtag.js) - Google Analytics