在Spring Cloud Config Server中配置两者后,仅从Vault提取秘密而不从Git提取秘密

时间:2019-11-06 10:31:47

标签: git spring-cloud-config hashicorp-vault spring-cloud-vault-config spring-vault

我将在Vault和Git中在Spring Cloud Config Server中设置的值作为后端。但是,当我向Spring Cloud Config Server发出请求时,我只希望从Vault中提取值,我想在请求中指定该值。 我阅读了发现here的文档,但是找不到类似的东西。 事实是,我想同时激活Vault和git这两个配置文件,但是当我向Vault发出请求时,我只希望从Vault中提取机密,而只是将请求丢弃到Git。

在云配置端的设置如下:

    spring:
  profiles:
    active: native, git, vault
  application:
    name: configserver
  cloud:
    config:
      server:
        native:
          searchLocations: file://${user.home}/config-repo
        git:
          uri: https://github.com/weekly-drafts/config-repo-spring-cloud-configserver-vault
        vault:
          port: 8200
          host: 127.0.01

有什么办法可以做到吗?

0 个答案:

没有答案