Spring JDBC Framework simplifies the use of JDBC and helps to avoid common errors.
The following example shows querying for list of maps using JdbcTemplate class.
/**
* Initialize context and get the JdbcTemplate
*/
ApplicationContext appContext = new ClassPathXmlApplicationContext("applicationContext.xml");
DataSource dataSource = (DataSource) appContext.getBean("dataSource");
JdbcTemplate template = new JdbcTemplate(dataSource);
List<Map<String, Object>> rows =
template.queryForList("select * from BUG_STAT");