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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionServiceOptions.getDefaultProjectId()checks for the project ID in theGOOGLE_CLOUD_PROJECTenvironment 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_PROJECTenvironment variable and the Metadata Server, among others.- Specified by:
getProjectIdin interfaceGcpProjectIdProvider- Returns:
- the project ID in the context
-