You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 (#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.
The text was updated successfully, but these errors were encountered:
peterfigure
changed the title
How to set R2dbcCustomConversions? And custom properties? @SpringBootApplication?
How to set R2dbcCustomConversions while using @SpringBootApplication?
Dec 14, 2020
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 (#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.The text was updated successfully, but these errors were encountered: