你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AbstractCosmosConfiguration Class
- java.
lang. Object - com.
azure. spring. data. cosmos. config. CosmosConfigurationSupport - com.
azure. spring. data. cosmos. config. AbstractCosmosConfiguration
- com.
- com.
public abstract class AbstractCosmosConfiguration
extends CosmosConfigurationSupport
To configure cosmos with client, cosmos factory and template
Constructor Summary
Constructor | Description |
---|---|
AbstractCosmosConfiguration() |
Creates an instance of AbstractCosmosConfiguration. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Cosmos |
cosmosAsyncClient(CosmosClientBuilder cosmosClientBuilder)
Declare Cosmos |
Cosmos |
cosmosConfig()
Declare Cosmos |
Cosmos |
cosmosFactory(CosmosAsyncClient cosmosAsyncClient)
Declare Cosmos |
Cosmos |
cosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)
Declare Cosmos |
Mapping |
mappingCosmosConverter(CosmosMappingContext cosmosMappingContext)
Declare Mapping |
Reactive |
reactiveCosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)
Declare Reactive |
Methods inherited from CosmosConfigurationSupport
Methods inherited from java.lang.Object
Constructor Details
AbstractCosmosConfiguration
public AbstractCosmosConfiguration()
Creates an instance of AbstractCosmosConfiguration.
Method Details
cosmosAsyncClient
public CosmosAsyncClient cosmosAsyncClient(CosmosClientBuilder cosmosClientBuilder)
Declare CosmosAsyncClient bean.
Parameters:
Returns:
cosmosConfig
public CosmosConfig cosmosConfig()
Declare CosmosConfig bean
Returns:
cosmosFactory
public CosmosFactory cosmosFactory(CosmosAsyncClient cosmosAsyncClient)
Declare CosmosFactory bean.
Parameters:
Returns:
cosmosTemplate
public CosmosTemplate cosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)
Declare CosmosTemplate bean.
Parameters:
Returns:
mappingCosmosConverter
public MappingCosmosConverter mappingCosmosConverter(CosmosMappingContext cosmosMappingContext)
Declare MappingCosmosConverter bean.
Parameters:
Returns:
reactiveCosmosTemplate
public ReactiveCosmosTemplate reactiveCosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)
Declare ReactiveCosmosTemplate bean.
Parameters:
Returns: