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 Details

    • azureCosmosClient

      @Bean @ConditionalOnMissingBean public com.azure.cosmos.CosmosClient azureCosmosClient(com.azure.cosmos.CosmosClientBuilder builder)
      Autoconfigure the CosmosClient instance.
      Parameters:
      builder - the CosmosClientBuilder to build the instance.
      Returns:
      the cosmos client instance.
    • azureCosmosAsyncClient

      @Bean @ConditionalOnMissingBean public com.azure.cosmos.CosmosAsyncClient azureCosmosAsyncClient(com.azure.cosmos.CosmosClientBuilder builder)
      Autoconfigure the CosmosAsyncClient instance.
      Parameters:
      builder - the CosmosClientBuilder to build the instance.
      Returns:
      the cosmos async client instance.