Closed mhalbritter closed 1 year ago
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); } }
Reopening as I think we need a MyBean.kt file for the docs.
MyBean.kt
Added in 3835e25a1868
Spring Framework 6.1 introduces the new JdbcClient. We should add an auto-configuration for it.
@jhoeller suggested something like this: