strelok
08/04/2017, 12:02 AMinline fun <reified T> JdbcTemplate.queryForObject(sql: String, varargs args: Any) = this.queryForObject(sql, T::class.java, args)
and use it like this:
val result: Long = jdbcTemplate.queryForObject("select external_system_id from foo where id = ? limit 1 ", id)
// OR
val result = jdbcTemplate.queryForObject<Long>("select external_system_id from foo where id = ? limit 1 ", id)