@Configuration @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 |
---|---|
GcpProjectIdProvider |
gcpProjectIdProvider() |
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 ServerCopyright © 2018 Pivotal Software, Inc.. All rights reserved.