gpt4 book ai didi

java - 从Spring云配置服务器获取GIT存储库的文件名列表

转载 作者:行者123 更新时间:2023-12-01 23:26:08 25 4
gpt4 key购买 nike

我正在使用带有 GIT 的 Spring 云配置服务器,它按预期工作正常。

现在,我的要求是从 Spring Cloud 服务器获取文件名列表。

Spring cloud config仅提供像http://localhost:8088/myconfig/default/master/config.properties这样的API来获取属性值。

有没有API可以获取所有文件名?如果没有,替代方法是什么?

最佳答案

不,不幸的是这是不可能的。我们在项目中所做的方式 - 在 config.properties 中添加具有所需文件名的属性,并使用

在代码中获取文件

additional endpoint at /{name}/{profile}/{label}/{path}

https://cloud.spring.io/spring-cloud-config/reference/html/#_serving_plain_text

关于java - 从Spring云配置服务器获取GIT存储库的文件名列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58307170/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com