参考 http://blog.csdn.net/gaopeng0071/article/details/75049952
使用NamedParameterJdbcTemplate
public class xxDao {
@Autowired
private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
public List<Map<String, Object>> getByIds(List<String> ids) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("ids", ids);
return namedParameerJdbcTemplate.queryForList("select aa, bb from tablea where aa in (:ids)", params);
}
}