我正在尝试从连接到 2 个源的配置服务器获取我的微服务配置:git 和 vault(用于机密)。我有下面的配置:在配置服务器中:
server:
port: 8888
spring:
profiles:
active: git, vault
cloud:
config:
server:
vault:
port: 8200
host: 127.0.0.1
kvVersion: 2
git:
order: 2
uri: git@gitlab.git
在 bootstrap.yml 的客户端:
spring:
application:
name: my-service-name
cloud:
config:
uri: http://localhost:8888
token: //token
label: dev
但在我的保险库中,我有这样的路径:
secret/cad
|--my-service-name
当我直接在其中制作我的秘密时,/secret/my-service-name
我可以访问我的秘密,但是我如何配置对秘密的访问:/secret/cad/my-service-name
谢谢你。