Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
针对yml或属性的Spring云配置Brixton.M5 HTTP 406_Spring_Gradle_Spring Boot_Spring Cloud - Fatal编程技术网

针对yml或属性的Spring云配置Brixton.M5 HTTP 406

针对yml或属性的Spring云配置Brixton.M5 HTTP 406,spring,gradle,spring-boot,spring-cloud,Spring,Gradle,Spring Boot,Spring Cloud,在项目中,我在build.gradle文件中设置了Brixton.M5 bom: dependencyManagement { imports { mavenBom "org.springframework.cloud:spring-cloud-starter-parent:Brixton.M5" } } SpringCloudConfig运行良好,可用于配置应用程序。但是,当我尝试访问除默认的{app name}/{profile}之外的任何rest端点时

在项目中,我在build.gradle文件中设置了Brixton.M5 bom:

dependencyManagement {

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

}
SpringCloudConfig运行良好,可用于配置应用程序。但是,当我尝试访问除默认的{app name}/{profile}之外的任何rest端点时,我得到的是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
或者这个卷曲:

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"}

只是缺少依赖关系吗?或者这是Brixton.M5配置的问题?

这是一个bug。试试Brixton.BUILD-SNAPSHOT。

谢谢@davesyer修复了它。不过,这很奇怪,格拉德尔2.11并不令人耳目一新。必须把gradle的储藏室吹走,因为它能正确地降下来。现在都打扫干净了,谢谢。