public List<Long> getxxxx(String no) {
String sql="select id from student  where no=? ";

RowMapper rowMapper = new RowMapper() {
public Object mapRow(ResultSet rs, int index) throws SQLException {
StuBean stuBean=new StuBean();
stuBean.setId(rs.getLong("id"));
        return stuBean.getId(); 
}
};
return getJdbcTemplate().query(sql,new Object[]{no},rowMapper);
}
class StuBean{
private Long id; setter//
getter//

}写法有错误吗?在数据库里写sql可以查到100+记录,但用程序一条也没出来,也不报错,为什么?