@Configuration(proxyBeanMethods=false)
@ConditionalOnProperty(name="spring.cloud.gcp.core.enabled",
havingValue="true",
matchIfMissing=true)
@EnableConfigurationProperties(value=GcpProperties.class)
public class GcpContextAutoConfiguration
extends Object
GoogleCredentials.
Binds properties from GcpProperties.| Constructor and Description |
|---|
GcpContextAutoConfiguration(GcpProperties gcpProperties) |
| Modifier and Type | Method and Description |
|---|---|
static GcpEnvironmentProvider |
gcpEnvironmentProvider()
Provides default implementation for determining GCP environment.
|
GcpProjectIdProvider |
gcpProjectIdProvider()
Get a GCP project ID provider.
|
com.google.api.gax.core.CredentialsProvider |
googleCredentials() |
public GcpContextAutoConfiguration(GcpProperties gcpProperties)
@Bean
@ConditionalOnMissingBean
public com.google.api.gax.core.CredentialsProvider googleCredentials()
throws Exception
Exception@Bean @ConditionalOnMissingBean public GcpProjectIdProvider gcpProjectIdProvider()
GcpProjectIdProvider that returns the project ID in the properties or, if
none, the project ID from the GOOGLE_CLOUD_PROJECT envvar and Metadata Server@Bean @ConditionalOnMissingBean public static GcpEnvironmentProvider gcpEnvironmentProvider()
Copyright © 2021. All rights reserved.