when simply declaring a bean of type R2dbcCustomConversions, it fails with:
00:36:33.182 [restartedMain] ERROR o.s.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.data.r2dbc.mapping.R2dbcMappingContext': Unexpected exception during bean creation; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.springframework.data.r2dbc.convert.R2dbcCustomConversions' available: expected single matching bean but found 2: org.springframework.data.r2dbc.convert.R2dbcCustomConversions#0,org.springframework.data.r2dbc.convert.R2dbcCustomConversions
even though I notice the bean declared in R2dbcDataAutoConfiguration is declared conditionally:
@Bean
@ConditionalOnMissingBean
public R2dbcCustomConversions r2dbcCustomConversions() {
I believe the above bean is created first (by virtue of @SpringBootApplication), this will make it challenging to partly adopt the kofu DSL which seems to be the desire for others also (https://github.com/spring-projects-experimental/spring-fu/issues/335). My only work around for now is to not use the R2DBC DSL and manually create the required beans.
Sample project illustrating the problem: https://github.com/peterfigure/minimal-kofu - In com.peterfigure.config.ApplicationConfigurationDSL please uncomment bean<R2dbcCustomConversions>() to see the issue.
when simply declaring a bean of type R2dbcCustomConversions, it fails with:
something like
even though I notice the bean declared in R2dbcDataAutoConfiguration is declared conditionally:
I believe the above bean is created first (by virtue of @SpringBootApplication), this will make it challenging to partly adopt the kofu DSL which seems to be the desire for others also (https://github.com/spring-projects-experimental/spring-fu/issues/335). My only work around for now is to not use the R2DBC DSL and manually create the required beans.
Sample project illustrating the problem: https://github.com/peterfigure/minimal-kofu - In
com.peterfigure.config.ApplicationConfigurationDSL
please uncommentbean<R2dbcCustomConversions>()
to see the issue.