Search in sources :

Example 1 with R2dbcMappingContext

use of org.springframework.data.r2dbc.mapping.R2dbcMappingContext in project spring-boot by spring-projects.

the class R2dbcDataAutoConfiguration method r2dbcMappingContext.

@Bean
@ConditionalOnMissingBean
public R2dbcMappingContext r2dbcMappingContext(ObjectProvider<NamingStrategy> namingStrategy, R2dbcCustomConversions r2dbcCustomConversions) {
    R2dbcMappingContext relationalMappingContext = new R2dbcMappingContext(namingStrategy.getIfAvailable(() -> NamingStrategy.INSTANCE));
    relationalMappingContext.setSimpleTypeHolder(r2dbcCustomConversions.getSimpleTypeHolder());
    return relationalMappingContext;
}
Also used : R2dbcMappingContext(org.springframework.data.r2dbc.mapping.R2dbcMappingContext) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1 R2dbcMappingContext (org.springframework.data.r2dbc.mapping.R2dbcMappingContext)1