Spring Framework 6.1 introduces the new JdbcClient. We should add an auto-configuration for it.
@jhoeller suggested something like this:
@Configuration(proxyBeanMethods = false)
@ConditionalOnSingleCandidate(NamedParameterJdbcTemplate.class)
@ConditionalOnMissingBean(JdbcClient.class)
class JdbcClientConfiguration {
@Bean
@Primary
JdbcClient jdbcClient(NamedParameterJdbcTemplate jdbcTemplate) {
return JdbcClient.create(jdbcTemplate);
}
}
Comment From: philwebb
Reopening as I think we need a MyBean.kt file for the docs.
Comment From: snicoll
Added in 3835e25a1868