在一个项目中,我在build.gradle文件中设置了Brixton.M5:
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-starter-parent:Brixton.M5"
}
}
Spring Cloud Config运行正常,可用于配置应用程序。但是,当我尝试触及默认{app name} / {profile}以外的任何其他端点时,我收到的是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配置的问题吗?
答案 0 :(得分:0)
这是一个错误。试试Brixton.BUILD-SNAPSHOT。