Spring Cloud Config配置

2024-01-10 16:00 更新

在Spring Cloud GCP Config中可以配置以下参数:

Name

描述

Required

Default value

spring.cloud.gcp.config.enabled

启用配置客户端

No

false

spring.cloud.gcp.config.name

您的申请名称

No

Value of the spring.application.name property. If none, application

spring.cloud.gcp.config.profile

活动资​​料

No

Value of the spring.profiles.active property. If more than a single profile, last one is chosen

spring.cloud.gcp.config.timeout-millis

连接到Google Runtime Configuration API的超时时间(以毫秒为单位)

No

60000

spring.cloud.gcp.config.project-id

托管Google Runtime Configuration API的GCP项目ID

No

 

spring.cloud.gcp.config.credentials.location

OAuth2凭据,用于通过Google Runtime Configuration API进行身份验证

No

 

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

Base64编码的OAuth2凭据,用于通过Google Runtime Configuration API进行身份验证

No

 

spring.cloud.gcp.config.credentials.scopes

Spring Cloud GCP配置凭据的OAuth2范围 35 /} GCP配置凭据的OAuth2范围

No

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

这些属性应在bootstrap.yml / bootstrap.properties 文件中指定,而不是通常的applications.yml / application.properties

如Spring Cloud GCP核心模块中所述,核心属性不适用于Spring Cloud GCP Config。

以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号