Class AbstractCosmosConfiguration
java.lang.Object
com.azure.spring.data.cosmos.config.CosmosConfigurationSupport
com.azure.spring.data.cosmos.config.AbstractCosmosConfiguration
To configure cosmos with client, cosmos factory and template
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncosmosAsyncClient
(CosmosClientBuilder cosmosClientBuilder) Declare CosmosAsyncClient bean.Declare CosmosConfig beancosmosFactory
(CosmosAsyncClient cosmosAsyncClient) Declare CosmosFactory bean.cosmosTemplate
(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter) Declare CosmosTemplate bean.mappingCosmosConverter
(CosmosMappingContext cosmosMappingContext) Declare MappingCosmosConverter bean.reactiveCosmosTemplate
(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
-
Constructor Details
-
AbstractCosmosConfiguration
public AbstractCosmosConfiguration()
-
-
Method Details
-
cosmosFactory
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
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
Declare CosmosConfig bean- Returns:
- CosmosConfig bean
-