SyntaxHighlighter

Wednesday, May 29, 2013

JdbcTemplate queryForInt() in Spring 3.2.2 Deprecated

JdbcTemplate queryForInt() in Spring 3.2.2 Deprecated

well, it's deprecated, but there's no real documentation to support what to do instead.

so, instead of

  jdbcTemplate.queryForInt("select count(*) from some_table");

i recommend you use this

  jdbcTemplate.queryForObject("select count(*) from some_table",Integer.class);

No comments:

Post a Comment