Ошибка zipkin Ошибка создания бина с именем 'webMvcMetricsFilter', определенного в ресурсе пути к классу - PullRequest
4 голосов
/ 02 февраля 2020

Когда я пытался интегрировать zipkin. Выкинул эту ошибку

Error Msg:Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'webMvcMetricsFilter' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/web/servlet/WebMvcMetricsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'webMvcMetricsFilter' parameter 0;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'prometheusMeterRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusMetricsExportAutoConfiguration.class]: Initialization of bean failed;
nested exception is org.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

версия:

  • Springboot 2.2.4
  • SpringCloud Hoxton.SR1 (Sleuth: 2.2.1)
  • zipkin 2.19.9
@EnableZipkinServer
@SpringBootApplication
public class C4ZipkinApplication {

    public static void main(String[] args) {
        SpringApplication.run(C4ZipkinApplication.class, args);
    }

}
<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
   <groupId>io.zipkin.java</groupId>
   <artifactId>zipkin-server</artifactId>
</dependency>
<dependency>
   <groupId>io.zipkin.java</groupId>
   <artifactId>zipkin-autoconfigure-ui</artifactId>
</dependency>
...