String sql = "select id,title,content,createdtime from blog where id="
+ id;QueryRunner qr = new QueryRunner(ds);
List list =(List) qr.query(sql, new BeanListHandler<Blog>(Blog.class));Blog blog = (Blog)list.get(0);如果不用QueryRunner方法,单纯的写数据库代码,怎么放结果集放入List中 而且还是Blog.class类型
+ id;QueryRunner qr = new QueryRunner(ds);
List list =(List) qr.query(sql, new BeanListHandler<Blog>(Blog.class));Blog blog = (Blog)list.get(0);如果不用QueryRunner方法,单纯的写数据库代码,怎么放结果集放入List中 而且还是Blog.class类型
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货