Class AzureCosmosAutoConfiguration
java.lang.Object
com.azure.spring.cloud.autoconfigure.AzureServiceConfigurationBase
com.azure.spring.cloud.autoconfigure.cosmos.AzureCosmosAutoConfiguration
@ConditionalOnClass(com.azure.cosmos.CosmosClientBuilder.class)
@ConditionalOnProperty(value="spring.cloud.azure.cosmos.enabled",
havingValue="true",
matchIfMissing=true)
@ConditionalOnAnyProperty(prefix="spring.cloud.azure.cosmos",
name="endpoint")
public class AzureCosmosAutoConfiguration
extends AzureServiceConfigurationBase
Auto-configuration
for Azure Cosmos DB support.- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.cosmos.CosmosAsyncClient
azureCosmosAsyncClient
(com.azure.cosmos.CosmosClientBuilder builder) Autoconfigure theCosmosAsyncClient
instance.com.azure.cosmos.CosmosClient
azureCosmosClient
(com.azure.cosmos.CosmosClientBuilder builder) Autoconfigure theCosmosClient
instance.Methods inherited from class com.azure.spring.cloud.autoconfigure.AzureServiceConfigurationBase
getAzureGlobalProperties, loadProperties
-
Method Details
-
azureCosmosClient
@Bean @ConditionalOnMissingBean public com.azure.cosmos.CosmosClient azureCosmosClient(com.azure.cosmos.CosmosClientBuilder builder) Autoconfigure theCosmosClient
instance.- Parameters:
builder
- theCosmosClientBuilder
to build the instance.- Returns:
- the cosmos client instance.
-
azureCosmosAsyncClient
@Bean @ConditionalOnMissingBean public com.azure.cosmos.CosmosAsyncClient azureCosmosAsyncClient(com.azure.cosmos.CosmosClientBuilder builder) Autoconfigure theCosmosAsyncClient
instance.- Parameters:
builder
- theCosmosClientBuilder
to build the instance.- Returns:
- the cosmos async client instance.
-