<@U289YL3KQ> you can write an extension method if...
# spring
s
@shainegordon you can write an extension method if you like:
Copy code
inline fun <reified T> JdbcTemplate.queryForObject(sql: String, varargs args: Any) = this.queryForObject(sql, T::class.java, args)
and use it like this:
Copy code
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)