Reputation: 5
I'm trying to reproduce http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_serving_plain_text serving a logback.xml file.
When I tried curl -v http://localhost:8888/gateway/default/master/logback.xml
I got a:
Hostname was NOT found in DNS cache
Trying 127.0.0.1...
Connected to localhost (127.0.0.1) port 8888 (#0)
GET /gateway/default/master/logback.xml HTTP/1.1
User-Agent: curl/7.35.0
Host: localhost:8888
Accept: /
HTTP/1.1 406 Not Acceptable
Server Apache-Coyote/1.1 is not blacklisted
Server: Apache-Coyote/1.1
X-Application-Context: configserver:8888
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 17 Mar 2016 17:26:02 GMT
Connection #0 to host localhost left intact
{"timestamp":1458235562683,"status":406,"error":"Not Acceptable","exception":"org.springframework.web.HttpMediaTypeNotAcceptableException","message":"Could not find acceptable representation","path":"/gateway/default/master/logback.xml"}%
I'm using Brixton.M5 and here is the repository structure:
- application.yml
- gateway.yml
- auth.yml
- eureka.yml
- logback.xml
- test.json
The curl -v http://localhost:8888/gateway/default/master/test.json
works normally.
Upvotes: 0
Views: 1410
Reputation: 25157
You need to use Brixton.BUILD-SNAPSHOT
(RC1 will be out later today or tomorrow).
I did it using http://github.com/spring-cloud-samples/config-repo/tree/master with http://localhost:8888/gateway/default/master/test.json and http://localhost:8888/gateway/default/master/books.xml and it worked ok.
Upvotes: 0