Spring yml 或属性的 Cloud Config Brixton.M5 HTTP 406
Spring Cloud Config Brixton.M5 HTTP 406 for yml or properties
在一个项目中,我的 build.gradle 文件中有 Brixton.M5 bom 设置:
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 配置的问题?
这是一个错误。尝试 Brixton.BUILD-SNAPSHOT。
在一个项目中,我的 build.gradle 文件中有 Brixton.M5 bom 设置:
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 配置的问题?
这是一个错误。尝试 Brixton.BUILD-SNAPSHOT。