Class AzureContextAutoConfiguration


  • @Configuration
    @EnableConfigurationProperties(AzureProperties.class)
    @ConditionalOnClass(com.azure.resourcemanager.AzureResourceManager.class)
    @ConditionalOnProperty(prefix="spring.cloud.azure",
                           value="resource-group")
    public class AzureContextAutoConfiguration
    extends Object
    Auto-config to provide default CredentialsProvider for all Azure services
    Author:
    Warren Zhu
    • Constructor Detail

      • AzureContextAutoConfiguration

        public AzureContextAutoConfiguration()
    • Method Detail

      • azureResourceManager

        @Bean
        @ConditionalOnMissingBean
        public com.azure.resourcemanager.AzureResourceManager azureResourceManager​(com.azure.core.credential.TokenCredential credential,
                                                                                   com.azure.core.management.profile.AzureProfile profile)
        Create an AzureResourceManager bean.
        Parameters:
        credential - The credential to connect to Azure.
        profile - The azure profile.
        Returns:
        An AzureResourceManager object.
      • azureProfile

        @Bean
        @ConditionalOnMissingBean
        public com.azure.core.management.profile.AzureProfile azureProfile​(AzureProperties azureProperties)
        Create an AzureProfile bean.
        Parameters:
        azureProperties - The azure properties.
        Returns:
        An AzureProfile object.
      • credential

        @Bean
        @ConditionalOnMissingBean
        public com.azure.core.credential.TokenCredential credential​(org.springframework.core.env.Environment environment)
        Create a TokenCredential bean.
        Parameters:
        environment - The environment.
        Returns:
        A TokenCredential object.
      • resourceGroupManager

        @Bean
        @ConditionalOnMissingBean
        @ConditionalOnBean(com.azure.resourcemanager.AzureResourceManager.class)
        public ResourceGroupManager resourceGroupManager​(com.azure.resourcemanager.AzureResourceManager azureResourceManager,
                                                         AzureProperties azureProperties)
        Create a ResourceGroupManager bean.
        Parameters:
        azureResourceManager - The azure resource manager.
        azureProperties - The azure properties.
        Returns:
        A ResourceGroupManager object.