【发布时间】:2021-01-13 01:30:06
【问题描述】:
在我的仓库中,有三个文件:config-client-dev.properties、config-client-prod.properties 和 config-client.properties。
我使用 curl 喜欢:
curl http://localhost:8888/config-client/dev/master
curl http://localhost:8888/config-client/prod/master
curl http://localhost:8888/config-client/default/master
我得到的结果是这样的:
{"name":"config-client","profiles":["prod"],"label":"master","version":null,"state":null,"propertySources":[] }
有没有办法获取属性文件中的值?
【问题讨论】:
-
@spencergibb 你能解释一下吗?不明白
-
/{application}-{profile}.yml /{label}/{application}-{profile}.yml /{application}-{profile}.properties /{label}/{application} -{profile}.properties
标签: spring-boot spring-cloud spring-cloud-config