Created
May 13, 2018 14:51
-
-
Save panlw/a769c632dd5d695675d691e1be389a0f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @see https://stackoverflow.com/questions/1327074/how-to-execute-in-sql-queries-with-springs-jdbctemplate-effectivly | |
Set<Integer> ids = ...; | |
MapSqlParameterSource parameters = new MapSqlParameterSource(); | |
parameters.addValue("ids", ids); | |
List<Foo> foo = getJdbcTemplate().query("SELECT * FROM foo WHERE a IN (:ids)", | |
parameters, getRowMapper()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment