你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AbstractCosmosConfiguration Class

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
CosmosAsyncClient cosmosAsyncClient(CosmosClientBuilder cosmosClientBuilder)

Declare CosmosAsyncClient bean.

CosmosConfig cosmosConfig()

Declare CosmosConfig bean

CosmosFactory cosmosFactory(CosmosAsyncClient cosmosAsyncClient)

Declare CosmosFactory bean.

CosmosTemplate cosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)

Declare CosmosTemplate bean.

MappingCosmosConverter mappingCosmosConverter(CosmosMappingContext cosmosMappingContext)

Declare MappingCosmosConverter bean.

ReactiveCosmosTemplate reactiveCosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)

Declare ReactiveCosmosTemplate bean.

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:

cosmosClientBuilder - cosmosClientBuilder

Returns:

CosmosAsyncClient bean

cosmosConfig

public CosmosConfig cosmosConfig()

Declare CosmosConfig bean

Returns:

CosmosConfig bean

cosmosFactory

public CosmosFactory cosmosFactory(CosmosAsyncClient cosmosAsyncClient)

Declare CosmosFactory bean.

Parameters:

cosmosAsyncClient - of cosmosFactory

Returns:

CosmosFactory bean

cosmosTemplate

public CosmosTemplate cosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)

Declare CosmosTemplate bean.

Parameters:

cosmosFactory - cosmosFactory
cosmosConfig - cosmosConfig
mappingCosmosConverter - mappingCosmosConverter

Returns:

CosmosTemplate bean

mappingCosmosConverter

public MappingCosmosConverter mappingCosmosConverter(CosmosMappingContext cosmosMappingContext)

Declare MappingCosmosConverter bean.

Parameters:

cosmosMappingContext - cosmosMappingContext

Returns:

MappingCosmosConverter bean

reactiveCosmosTemplate

public ReactiveCosmosTemplate reactiveCosmosTemplate(CosmosFactory cosmosFactory, CosmosConfig cosmosConfig, MappingCosmosConverter mappingCosmosConverter)

Declare ReactiveCosmosTemplate bean.

Parameters:

cosmosFactory - cosmosFactory
cosmosConfig - cosmosConfig
mappingCosmosConverter - mappingCosmosConverter

Returns:

ReactiveCosmosTemplate bean

Applies to