Spring Cloud Datastore設(shè)置

2024-01-11 15:31 更新

您可以使用Spring Boot Starter for Spring Data數(shù)據(jù)存儲(chǔ)區(qū)在Spring應(yīng)用程序中自動(dòng)配置Google Cloud數(shù)據(jù)存儲(chǔ)區(qū)。 它包含所有必要的設(shè)置,使您可以輕松地通過Google Cloud項(xiàng)目進(jìn)行身份驗(yàn)證。以下配置選項(xiàng)可用:

Name

描述

Required

Default value

spring.cloud.gcp.datastore.enabled

啟用Cloud Datastore客戶端

No

true

spring.cloud.gcp.datastore.project-id

托管Google Cloud Datastore API的GCP項(xiàng)目ID(如果與Spring Cloud GCP核心模塊中的 ID不同)

No

 

spring.cloud.gcp.datastore.credentials.location

用于與Google Cloud Datastore API進(jìn)行身份驗(yàn)證的OAuth2憑據(jù)(如果與Spring Cloud GCP核心模塊中的憑據(jù)不同)

No

 

spring.cloud.gcp.datastore.credentials.encoded-key

用于與Google Cloud Datastore API進(jìn)行身份驗(yàn)證的Base64編碼的OAuth2憑據(jù)(如果與Spring Cloud GCP核心模塊中的憑據(jù)不同)

No

 

spring.cloud.gcp.datastore.credentials.scopes

Spring Cloud適用于Spring Cloud GCP Cloud Datastore憑證的范圍 35 /} GCP Cloud Datastore憑證的OAuth2范圍

No

https://www.googleapis.com/auth/datastore

spring.cloud.gcp.datastore.namespace

要使用的Cloud Datastore命名空間

No

the Default namespace of Cloud Datastore in your GCP project


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)