Class AzureContextAutoConfiguration
- java.lang.Object
-
- com.azure.spring.cloud.autoconfigure.context.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 defaultCredentialsProvider
for all Azure services- Author:
- Warren Zhu
-
-
Constructor Summary
Constructors Constructor Description AzureContextAutoConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.azure.core.management.profile.AzureProfile
azureProfile(AzureProperties azureProperties)
Create anAzureProfile
bean.com.azure.resourcemanager.AzureResourceManager
azureResourceManager(com.azure.core.credential.TokenCredential credential, com.azure.core.management.profile.AzureProfile profile)
Create anAzureResourceManager
bean.com.azure.core.credential.TokenCredential
credential(org.springframework.core.env.Environment environment)
Create aTokenCredential
bean.ResourceGroupManager
resourceGroupManager(com.azure.resourcemanager.AzureResourceManager azureResourceManager, AzureProperties azureProperties)
Create aResourceGroupManager
bean.
-
-
-
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 anAzureResourceManager
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 anAzureProfile
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 aTokenCredential
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 aResourceGroupManager
bean.- Parameters:
azureResourceManager
- The azure resource manager.azureProperties
- The azure properties.- Returns:
- A ResourceGroupManager object.
-
-