Package com.google.cloud.spring.core
Class DefaultGcpProjectIdProvider
java.lang.Object
com.google.cloud.spring.core.DefaultGcpProjectIdProvider
- All Implemented Interfaces:
GcpProjectIdProvider
A project ID provider that wraps
ServiceOptions.getDefaultProjectId()
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionServiceOptions.getDefaultProjectId()
checks for the project ID in theGOOGLE_CLOUD_PROJECT
environment variable and the Metadata Server, among others.
-
Constructor Details
-
DefaultGcpProjectIdProvider
public DefaultGcpProjectIdProvider()
-
-
Method Details
-
getProjectId
ServiceOptions.getDefaultProjectId()
checks for the project ID in theGOOGLE_CLOUD_PROJECT
environment variable and the Metadata Server, among others.- Specified by:
getProjectId
in interfaceGcpProjectIdProvider
- Returns:
- the project ID in the context
-