当我尝试集成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
- 斯普林克劳德·霍克斯顿。SR1(侦探: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>
2条答案
按热度按时间nue99wik1#
您的应用程序在Tomcat服务器中启动,但Zipkin使用另一个服务器,但我不知道这个名称,我包含了这段代码,用于忽略Tomcat服务器的spring boot starter web依赖性
这对我有用,试试看
hs1ihplo2#
如果您使用的是配置服务器,请记住在运行微服务之前先运行它。