简体   繁体   English

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

[英]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.

相关问题 Spring Boot Cloud Embedding Config Server为每个请求从Git存储库获取属性 - Spring boot Cloud Embedding Config Server to get properties from Git repo for each request 将 spring 云配置服务器连接到本地 git 存储库失败 - connecting spring cloud config server to local git repo failed Spring 云配置服务器未从 git 提取最新提交 - Spring cloud Config server not pulling latest commit from git 无法在 Spring 云配置服务器中从 GIT 读取属性源 - Unable to read property source from GIT in Spring cloud config server 在没有 Git 存储库的情况下使用 Spring Cloud Config - Using Spring Cloud Config without Git repo Spring Cloud Config Server还能将配置更新推送到远程git repo吗? - Can the Spring Cloud Config Server also push config updates to the remote git repo? Spring Cloud Config Server-设置克隆git repo的文件夹的目录 - Spring cloud config server -Set directory of folder where git repo are cloned 无法使用 spring-cloud-config-server 从本地 git 存储库读取配置 - Unable to read configurations from local git repository using spring-cloud-config-server java - 如何在java spring中将propertysource设置为从云配置服务器获取的配置文件? - How to set propertysource to config file fetched from cloud config server in java spring? Spring Config-server 仅从我的 git 存储库在配置文件上抛出 404 - Spring Config-server throwing 404 on config file only from my git repository
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM