简体   繁体   中英

Spring Cloud Config Brixton.M5 HTTP 406 for yml or properties

In a project, I have the Brixton.M5 bom setup in my build.gradle file:

dependencyManagement {

    imports {
        mavenBom "org.springframework.cloud:spring-cloud-starter-parent:Brixton.M5"
    }

}

Spring Cloud Config runs fine and is available to configure the apps. However, when I try to hit any of the rest endpoints other than the default {app name}/{profile}, I am getting a HTTP 406

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Tue Mar 01 10:57:37 EST 2016
There was an unexpected error (type=Not Acceptable, status=406).
Could not find acceptable representation

Or this with curl:

curl -s http://10.6.6.162:8888/service-default.yml
{"timestamp":1456847908745,"status":406,"error":"Not Acceptable","exception":"org.springframework.web.HttpMediaTypeNotAcceptableException","message":"Could not find acceptable representation","path":"/service-default.yml"}

Is it just a missing dependency? Or is this an issue with Brixton.M5 configuration?

It was a bug. Try Brixton.BUILD-SNAPSHOT.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM