spring - 用于yml或属性的Spring Cloud Config Brixton.M5 HTTP 406

标签 spring gradle spring-boot spring-cloud

在一个项目中,我的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 :
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。

关于spring - 用于yml或属性的Spring Cloud Config Brixton.M5 HTTP 406,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35727596/

相关文章:

java - 使用 Redis 创建名称为 'enableRedisKeyspaceNotificationsInitializer' 的 bean 时出错

java - 在 ConditionalOnExpression 评估期间 PropertySource 不可用

android - 任务 ':app:compileFlutterBuildDebug' 执行失败-flutter.gradle 行 : 1035

hibernate - 如何在Kotlin Spring Boot中生成QClass?

spring - 不同应用服务器上的DAO

java - 为什么我在启动 springdata Rest api 时遇到异常

android - 重命名的 apk 无法通过 Android Studio 安装

spring-boot - 在 Spring 框架中使用 timeout 属性有什么好处?

java - 添加 Openfeign 依赖时出现 java.lang.IllegalStateException

java - 如何使用 Spring Boot 和 Maven 设置配置文件?