Class AbstractCosmosConfiguration
- java.lang.Object
-
- com.azure.spring.data.cosmos.config.CosmosConfigurationSupport
-
- com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration
-
@Configuration public abstract class AbstractCosmosConfiguration extends CosmosConfigurationSupport
To configure cosmos with client, cosmos factory and template
-
-
Constructor Summary
Constructors Constructor Description AbstractCosmosConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CosmosAsyncClientcosmosAsyncClient(CosmosClientBuilder cosmosClientBuilder)Declare CosmosAsyncClient bean.CosmosConfigcosmosConfig()Declare CosmosConfig beanCosmosFactorycosmosFactory(CosmosAsyncClient cosmosAsyncClient)Declare CosmosFactory bean.CosmosTemplatecosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)Declare CosmosTemplate bean.MappingCosmosConvertermappingCosmosConverter(CosmosMappingContext cosmosMappingContext)Declare MappingCosmosConverter bean.ReactiveCosmosTemplatereactiveCosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)Declare ReactiveCosmosTemplate bean.-
Methods inherited from class com.azure.spring.data.cosmos.config.CosmosConfigurationSupport
cosmosMappingContext, expressionResolver, getDatabaseName, getInitialEntitySet, getMappingBasePackages, scanForEntities
-
-
-
-
Method Detail
-
cosmosFactory
@Bean public CosmosFactory cosmosFactory(CosmosAsyncClient cosmosAsyncClient)
Declare CosmosFactory bean.- Parameters:
cosmosAsyncClient- of cosmosFactory- Returns:
- CosmosFactory bean
-
mappingCosmosConverter
@Bean public MappingCosmosConverter mappingCosmosConverter(CosmosMappingContext cosmosMappingContext)
Declare MappingCosmosConverter bean.- Parameters:
cosmosMappingContext- cosmosMappingContext- Returns:
- MappingCosmosConverter bean
-
cosmosAsyncClient
@Bean public CosmosAsyncClient cosmosAsyncClient(CosmosClientBuilder cosmosClientBuilder)
Declare CosmosAsyncClient bean.- Parameters:
cosmosClientBuilder- cosmosClientBuilder- Returns:
- CosmosAsyncClient bean
-
cosmosTemplate
@Bean public CosmosTemplate cosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)
Declare CosmosTemplate bean.- Parameters:
cosmosFactory- cosmosFactorycosmosConfig- cosmosConfigmappingCosmosConverter- mappingCosmosConverter- Returns:
- CosmosTemplate bean
-
reactiveCosmosTemplate
@Bean public ReactiveCosmosTemplate reactiveCosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)
Declare ReactiveCosmosTemplate bean.- Parameters:
cosmosFactory- cosmosFactorycosmosConfig- cosmosConfigmappingCosmosConverter- mappingCosmosConverter- Returns:
- ReactiveCosmosTemplate bean
-
cosmosConfig
@Bean public CosmosConfig cosmosConfig()
Declare CosmosConfig bean- Returns:
- CosmosConfig bean
-
-