InvalidPropertyException:无效的属性' classDAO'豆类:没有财产' classDAO'

时间:2015-07-01 04:00:18

标签: java spring

您好我一直在尝试在我们的服务器上实现一个新bean。每次我尝试运行服务器时都会抛出此错误。

org.springframework.beans.factory.BeanCreationException:创建名称为' walletToWalletService'的bean时出错在URL [file:/opt/WSappl/webapps/axis2/WEB-INF/springjdbc.xml]中定义:初始化  豆失败;嵌套异常是org.springframework.beans.InvalidPropertyException:无效的属性“walletToWalletDAO' bean类[com.cbas.jdbc.walletToWallet.WalletToWalletServiceImpl]:  没有财产&wallet39oWalletDAO'结果

这是springjdbc.xml文件

 <bean id="walletToWalletDAO" class="com.cbas.jdbc.walletToWallet.WalletToWalletDAO">
            <property name="dataSource">
                    <ref bean="dataSource" />
            </property>
    </bean>

    <bean id="walletToWalletService" class="com.cbas.jdbc.walletToWallet.WalletToWalletServiceImpl">
            <property name="walletToWalletDAO">
                    <ref bean="walletToWalletDAO" />
            </property>
    </bean>

这是我的classDAO

package com.cbas.jdbc.walletToWallet;

import com.cbas.jdbc.common.BaseDAO;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.namedparam.BeanPropertySqlParameterSource;
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
import org.springframework.jdbc.core.simple.SimpleJdbcInsert;

public class WalletToWalletDAO extends BaseDAO
{
  private static String TABLE = "WALLET_EVENT_LOG";

  public static String FIELD_ID = "ID";
  public static String FIELD_MSISDN = "MSISDN";
  public static String FIELD_AMOUNT = "AMOUNT";
  public static String FIELD_DEST_ACCOUNT = "DEST_ACCOUNT";
  public static String FIELD_TRANSFER_DATE = "TRANSFER_DATE";
  public static String FIELD_CHANNEL_TYPE = "CHANNEL_TYPE";

  protected String getTable()
  {
    return this.TABLE;
  }

  protected RowMapper getObjectMapper()
  {
    return new WalletToWalletRowMapper();
  }

  protected long save(WalletToWalletBean record) {
    SqlParameterSource parameters = new BeanPropertySqlParameterSource(record);
    SimpleJdbcInsert simpleJdbcInsert = getSimpleJdbcInsert().withTableName(getTable()).usingGeneratedKeyColumns(new String[] { "ID" });
    return simpleJdbcInsert.executeAndReturnKey(parameters).longValue();
  }

  protected void delete(long id) {
    StringBuilder builder = new StringBuilder("DELETE FROM ");
    builder.append(getTable());
    builder.append(" WHERE ");
    builder.append(FIELD_ID).append("=");
    builder.append(id);
    getJdbcTemplate().execute(builder.toString());
  }
}

0 个答案:

没有答案