Spring Cloud Config Server plain text

拥有回忆 提交于 2019-12-11 02:26:48

问题


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

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

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

and get the contents of the simple.conf file, but I'm getting a 404 for every combination I've tried.

I'm using 1.0.4.RELEASE version

Is there a working example of this or have I misunderstood the usage?


回答1:


As per comments from Spencer, the version I was using did not support this so used 1.1.0.M5 solved this for me.



来源:https://stackoverflow.com/questions/35355940/spring-cloud-config-server-plain-text

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!