当前位置: 代码迷 >> J2EE >> spring注入,提示Invalid property name 'CodedbDao' - not JavaBean compliant解决思路
  详细解决方案

spring注入,提示Invalid property name 'CodedbDao' - not JavaBean compliant解决思路

热度:148   发布时间:2016-04-22 02:53:32.0
spring注入,提示Invalid property name 'CodedbDao' - not JavaBean compliant
applicationContext.xml:
XML code
    <bean id="LoginCodedbDAO" class="com.zjm.ssh2.login.dao.hibernate.CodedbDAO">        <property name="sessionFactory">            <ref bean="sessionFactory" />        </property>    </bean>    <bean id="LoginCodeService" class="com.zjm.ssh2.login.services.CodeService">        <property name="CodedbDao">     <!--[color=#FF0000]这行报错[/color]-->            <ref bean="LoginCodedbDAO" />        </property>    </bean>



CodeService.java:
Java code
package com.zjm.ssh2.login.services;import com.zjm.ssh2.login.dao.iface.ICodedbDAO;import com.zjm.ssh2.login.services.iface.ICodeService;public class CodeService implements ICodeService {    public ICodedbDAO CodedbDao;    public ICodedbDAO getCodedbDao() {        return CodedbDao;    }    public void setCodedbDao(ICodedbDAO codedbDao) {        CodedbDao = codedbDao;    }}


CodedbDAO.java
Java code
import com.zjm.ssh2.login.dao.iface.ICodedbDAO;public class CodedbDAO extends HibernateDaoSupport implements ICodedbDAO {......}



applicationContext.xml文件里<property name="CodedbDao">这行报错:Invalid property name 'CodedbDao' - not JavaBean compliant
请问怎么回事

------解决方案--------------------
JavaBean 规范

请把首字母改小写试试
  相关解决方案