Spring Boot greatly simplifies the Spring Framework on Google Cloud experience.
Our starters handle the object instantiation and configuration logic so you don’t have to.
Every starter depends on the GCP starter to provide critical bits of configuration, like the GCP project ID or OAuth2 credentials location.
You can configure these as properties in, for example, a properties file:
spring.cloud.gcp.project-id=[YOUR_GCP_PROJECT_ID]
spring.cloud.gcp.credentials.location=file:[LOCAL_PRIVATE_KEY_FILE]
spring.cloud.gcp.credentials.scopes=[SCOPE_1],[SCOPE_2],[SCOPE_3]
These properties are optional and, if not specified, Spring Boot will attempt to automatically find them for you.
For details on how Spring Boot finds these properties, refer to the documentation.
|
Note
|
If your app is running on Google App Engine or Google Compute Engine, in most cases, you should omit the spring.cloud.gcp.credentials.location property and, instead, let the Spring Framework on Google Cloud Core Starter find the correct credentials for those environments.
|