Spring Cloud Config Server 纯文本 [英] Spring Cloud Config Server plain text
问题描述
我一直在研究 Spring Cloud Config Server,但无法按预期返回纯文本文件.这里的概述 http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_serving_plain_text 描述了通过端点提供实际文件内容的能力:
I've been looking into Spring Cloud Config Server but I am unable to get plain text files returned as I expect. The overview here http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_serving_plain_text describes the ability to serve the actual file content via and endpoint:
/foo/default/master/nginx.conf
但我无法让它发挥作用.在我的 Spring Server 配置中,我有:
but I'm not able to get this to work. In my Spring Server config I have:
spring:
cloud:
config:
server:
git:
uri: ssh://xxxxxxxx/cloudconfig.git
cloneOnStart: true
searchPaths: test
在我的 cloudconfig 存储库中,我有 2 个文件(都称为 simple.conf),一个在根目录中,另一个在/test 目录中,所以我认为我应该能够访问 URL
and in my cloudconfig repo I have 2 files (both called simple.conf), one in the root and one in /test directory so I assume I should just be able to hit the URL
http://localhost:8888/test/default/master/simple.conf
并获取 simple.conf 文件的内容,但是对于我尝试过的每个组合,我都得到了 404.
and get the contents of the simple.conf file, but I'm getting a 404 for every combination I've tried.
我使用的是 1.0.4.RELEASE 版本
I'm using 1.0.4.RELEASE version
是否有这方面的工作示例或我误解了用法?
Is there a working example of this or have I misunderstood the usage?
推荐答案
根据 Spencer 的评论,我使用的版本不支持此功能,因此使用 1.1.0.M5 为我解决了这个问题.
As per comments from Spencer, the version I was using did not support this so used 1.1.0.M5 solved this for me.
这篇关于Spring Cloud Config Server 纯文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!