I'm trying to implement the solution mentioned on SO here However, i'm getting an error "Rowmapper is abstract cannot be instantiated" and "illegal start of expression". Below is exactly what I ha
List<String> strLst = jdbcTemplate.query(query,
new RowMapper {
public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
return rs.getString(1);
}
});
What if I have multiple ?
in my query.
for example:
select * from table where a = ? and b = ?
how can I pass the parameters (?
) into this query in the code above?