1. queryForInt()/queryForLong()
2. queryForObject()
3. queryForList()4.
queryForMap()
5. query()
String sql ="SELECT address FROM cms.userinfo WHERE id = ?";
String name=jdbcTemplate.queryForObject(sql,String.class,1);
返回的结果是一个List<Map>结构的集合
List> list =jdbcTemplate.queryForList("SELECT * FROM cms.userinfo ",new Object[]{});
Stringsql1="select * from cms.userinfo ";
RowMapper rowMapper=new BeanPropertyRowMapper(Userinfo.class);
List users=jdbcTemplate.query(sql1, rowMapper);