发布时间:2022-07-04 文章分类:编程知识 投稿人:王小丽 字号: 默认 | | 超大 打印

代码

List rows = jdbcTemplate.queryForList("SELECT * FROM USER");

Iterator it = rows.iterator();

while(it.hasNext()) {

Map userMap = (Map) it.next();

System.out.print(userMap.get("user_id") + "\t");

System.out.print(userMap.get("name") + "\t");

System.out.print(userMap.get("sex") + "\t");

System.out.println(userMap.get("age") + "\t");

}