本帖最后由 o2cola 于 2010-07-22 16:19:31 编辑

解决方案 »

  1.   

    getSingleColumnRowMapper(requiredType)  上面是通过这个来找的RowMapper。异常是:
    //报异常 Incorrect column count: expected 1, actual 3说明你的字段没有对。 好好哥哥检查下。
      

  2.   


    检查过了呢,没有问题,就3个属性,name,sex,age,和数据库字段一样
      

  3.   

    The query is expected to be a single row/single column query;
    这里的/是或的意思还是并且的意思???如果是并且,那么这里就只能用数据类型的类,如果是或。哎,搞不懂,要请教英文帝了
      

  4.   

    The query is expected to be a single row/single column query; the returned result will be directly mapped to the corresponding object type. 从最后一句的object type而不是data type应该说明的不是那几个数据类型把
      

  5.   

    用getJdbcTemplate().queryForObject(sql, BeanPropertyRowMapper.newInstance(Person.class),paras);