首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带有SpringBoot2.2和Hoxton的Zipkin

带有SpringBoot2.2和Hoxton的Zipkin
EN

Stack Overflow用户
提问于 2019-12-16 09:33:23
回答 1查看 1.1K关注 0票数 6

我想将我的项目Zipkin安装程序更新为SpringBoot2.2.2.2。project和Spring Hoxton.RELEASE,但是看起来简单的jars更新是不够的。

我认为旧的设置(它对SpringBoot2.1.5很好,appears和Greenwich.SR2)也适用于Boot2.2.2.RELEASE和Hoxton.RELEASE,但在这里我似乎仍然遗漏了一些东西。

代码语言:javascript
复制
    <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 /Writer/Buffer$Writer):

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

发布于 2021-04-25 06:28:51

这是版本问题。Zipkin正式建议在zipkin-server之后在客户服务器上使用spring-boot 2.x

对我来说,2.12.9库在spring-boot 2.1.8.RELEASEspring-cloud Greenwich.SR6下运行良好

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59353834

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档