如何选择要连接的datastore数据库

问题描述 投票:0回答:1

我在 GCP 中有两个数据存储数据库“default”和“mydb”。 我的项目凭据是由 Google Cloud SDK“gcloud auth application-default login”命令提供的,当我运行我的项目时,它会连接到“默认”数据库。我如何选择连接到“mydb”?

spring spring-boot google-cloud-platform google-cloud-datastore
1个回答
0
投票

来自 https://github.com/GoogleCloudPlatform/spring-cloud-gcp/pull/2150/files。我不知道这是哪个 Spring Boot 版本,但是您可以使用

spring.cloud.gcp.datastore.database-id
设置数据库名称。

© www.soinside.com 2019 - 2024. All rights reserved.