我有多服务应用程序,它使用Spring。现在我必须用zipkin和那个应用程序。我记得当我有一个没有假象的应用程序时,我只是添加了Sleuth和Zipkin,启动了依赖关系,并在端口9411上运行zipkin服务器。在那之后,Zipkin工作得很好。但是现在,当我假装在我的应用程序中尝试同样的时候,我得到了错误500 “原始请求是必需的”。我想,当Sleuth添加跟踪信息时,假象在标题上有一些问题。你能帮我修一下吗?
发布于 2019-02-21 21:32:10
没有更多的信息是很难说的。但它可能与不兼容库有关。您可以发布您的依赖项吗?
如果您使用的是带有最新 spring云的早期版本的,那么它可能会导致这个问题。
我使用的是Greenwich.RELEASE和okhttpclient:10.2.0,它没有问题
发布于 2020-01-03 14:02:23
使用下面的spring依赖管理下载适合云版本的版本
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>我使用的是Java 10,cloud.version是Finchley.SR2和sprinb:2.2.0,:2.1.2.RELEASE,这个组合对我解决这个问题起了作用。
接受问题是10.x.x假装核心不是只起作用的,io.github.openfeign:feign-core:jar:9.7.0:compile也在工作。
发布于 2020-06-03 18:51:55
我使用java 11、springboot 2.3.0.RELEASE和spring云版本Greenwich.RELEASE来解决这个问题。
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-okhttp</artifactId>
<version>10.2.0</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId>
<version>10.2.0</version>
</dependency>希望这能帮上忙。
https://stackoverflow.com/questions/54262815
复制相似问题