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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.azure.cosmos.CosmosAsyncClient
cosmosAsyncClient
(com.azure.cosmos.CosmosClientBuilder cosmosClientBuilder) Declare CosmosAsyncClient bean.Declare CosmosConfig beancosmosFactory
(com.azure.cosmos.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()Creates an instance ofAbstractCosmosConfiguration
.
-
-
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
@Bean public com.azure.cosmos.CosmosAsyncClient cosmosAsyncClient(com.azure.cosmos.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
Declare CosmosConfig bean- Returns:
- CosmosConfig bean
-