gpt4 book ai didi

spring-boot - Zipkin 与 Spring Boot 2.2 和 Hoxton Cloud

转载 作者:行者123 更新时间:2023-12-03 14:55:00 26 4
gpt4 key购买 nike

我想将我的项目 Zipkin 设置更新为 Spring Boot 2.2.2.RELEASE 和 Spring Cloud Hoxton.RELEASE,但看起来简单的 jars 更新是不够的。

我认为旧的设置(它适用于 Spring Boot 2.1.5.RELEASE 和 Greenwich.SR2)也适用于 Boot 2.2.2.RELEASE 和 Hoxton.RELEASE,但似乎我仍然错过了一些东西。

    <parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath/>
</parent>

<properties>
...
<spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
<!-- <zipkin.version>2.12.9</zipkin.version> does not work either-->
<zipkin.version>2.11.8</zipkin.version>
...
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-server</artifactId>
<version>${zipkin.version}</version>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-autoconfigure-ui</artifactId>
<version>${zipkin.version}</version>
<scope>runtime</scope>
</dependency>
...
</dependencies>


我收到以下异常( java.lang.NoClassDefFoundError: zipkin2
/internal/Buffer$Writer
):
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcMetricsFilter' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/web/servlet/We
bMvcMetricsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'webMvcMetricsFilter' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pr
ometheusMeterRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusMetricsExportAutoConfiguration.class]: Initialization of bean failed; nested exception is or
g.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'zipkin2.server.internal.ZipkinServerConfiguration': Unsatisfied dependency expressed through field 'httpQuery'; nested exception is org
.springframework.beans.factory.BeanCreationException: Error creating bean with name 'zipkin2.server.internal.ZipkinQueryApiV2': Bean instantiation via constructor failed; nested exception is java.lang.NoClassDefFoundError: zipkin2
/internal/Buffer$Writer

最佳答案

是版本问题。 Zipkin 官方推荐使用 zipkin-server spring-boot 2.x 后客户服务器的状态.
对我来说,2.12.9库在 spring-boot 2.1.8.RELEASE 下运行良好与 spring-cloud Greenwich.SR6

关于spring-boot - Zipkin 与 Spring Boot 2.2 和 Hoxton Cloud,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59353834/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com