[英]Getting list of file names from GIT repo from Spring cloud config server
I am using Spring cloud config server with GIT which is working fine as expected.我正在使用 Spring 云配置服务器和 GIT,它按预期工作。
Now, my requirement is to get the list of filenames from the spring cloud server.现在,我的要求是从 spring 云服务器获取文件名列表。
Spring cloud config only provides API likehttp://localhost:8088/myconfig/default/master/config.properties to get the property values. Spring 云配置只提供 API 像http://localhost:8088/myconfig/default/master/config.properties来获取属性值。
Is there any API available to get all file names?是否有任何 API 可用于获取所有文件名? If not, what would be the alternate approach?
如果不是,那么替代方法是什么?
No, unfortunately it's not possible.不,不幸的是这是不可能的。 The way we did in our project - added properties with needed file names in config.properties and fetched files in the code using
我们在项目中所做的方式 - 在 config.properties 中添加具有所需文件名的属性,并在代码中使用
additional endpoint at /{name}/{profile}/{label}/{path}
/{name}/{profile}/{label}/{path} 的附加端点
https://cloud.spring.io/spring-cloud-config/reference/html/#_serving_plain_text https://cloud.spring.io/spring-cloud-config/reference/html/#_serving_plain_text
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.