Spring Cloud GCP 范圍

2024-01-09 17:31 更新

默認(rèn)情況下,Spring Cloud GCP Starter提供的憑據(jù)包含Spring Cloud GCP支持的每個服務(wù)的范圍。

通過Spring Cloud GCP啟動程序,您可以為提供的憑據(jù)配置自定義范圍列表。為此,請spring.cloud.gcp.credentials.scopes屬性中指定逗號分隔的Google OAuth2作用域列表

spring.cloud.gcp.credentials.scopesGoogle Cloud Platform服務(wù)Google OAuth2范圍的逗號分隔列表,提供的CredentialsProvider支持返回的憑據(jù)。

spring.cloud.gcp.credentials.scopes=https://www.googleapis.com/auth/pubsub,https://www.googleapis.com/auth/sqlservice.admin

您還可以使用DEFAULT_SCOPES占位符作為范圍來表示啟動程序的默認(rèn)范圍,并附加需要添加的其他范圍。

spring.cloud.gcp.credentials.scopes=DEFAULT_SCOPES,https://www.googleapis.com/auth/cloud-vision
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號