with many exciting features, but for me, the most important one is the support. Not only because I love the language but because I contributed to it. (I know, shameless plug) Spring 5 was released last week Kotlin One of the features included in this support is a set of extension functions for and that gives you a more idiomatic API. JdbcTemplate MapSqlParamaterSource Let’s translate the official guide to Kotlin Accessing Relational Data using JDBC with Spring Using Spring 5.0 JDBC For this example, we’ll use Spring Boot 2.0 SNAPSHOT Customer data class Using JdbcTemplate Let’s comment the most interesting lines. is declared inside the companion object on line 46 log Function will help us to save some typing. Inside the block, we can access all members of . with with jdbcTemplate is a . Later we’ll use ’s destructuring declarations. splitUpNames List<Pair<String, String>> Pair Inside any function that has a parameter type with destructuring declarations ( , and so on), you can replace it with them. In this case, we replace with . component1() component2() Pair<String, String> (String, String) Last parameter of is a which is a Java 8 functional interface. We can use functional interfaces in Kotlin as functions, including declarations. batchUpdate ParameterizedPreparedStatementSetter<T> destructuring This query is an extension function. It changes the order of parameters and switches into a . Because we aren’t using the last parameter (the row number), we can replace it with _ RowMapper<T> (ResultSet, Int) ->T Speaking about extensions functions, you can check the kdoc . here Using NamedParameterJdbcTemplate is a version of that use named parameters ( ) instead of placeholders ( ). Spring 5 doesn’t provides any extension functions for (the API is good enough to use it from Kotlin) but it provides for a related class, . NamedParameterJdbcTemplate JdbcTemplate ‘:parameter1’ ‘?’ NamedParameterJdbcTemplate extension functions MapSqlParameterSource returns a plain if you still need to use it jdbcOperations JdbcTemplate is a sources List<MapSqlParameterSource> Extension function to set parameters in an array-like setter. There isn’t extension function to read with an array-like getter but we can add one easily. This insert query use named parameters. receives a as a second parameters, very easy to use in Kotlin. query Map<String, *> Conclusion Spring JDBC with Kotlin provides a solid API for your relational database application. Enjoy.