spring-boot - 无法使用 MicroMeter 而不是 Prometheus
问题描述
我将我的 Spring 版本从 1.5 升级到 2.0,并将 Prometheus 版本 0.3.0 升级到 0.6.0。但不幸的是,它不起作用。我被告知我必须使用MicroMeter
代替SimpleClient
并添加io.micrometer
到我的pom.xml
和@EnablePrometheusEndpointremoved
我的MetricConfig
班级,但我遇到了以下错误。你知道我为什么会出现这种错误吗?
引起:org.springframework.beans.factory.BeanCreationException:在类路径资源[org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]中定义名称为“servletEndpointRegistrar”的bean创建错误:bean实例化通过工厂方法失败;嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]:工厂方法“servletEndpointRegistrar”抛出异常;嵌套异常是 org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为“routeControllerEndpoint”的 bean 时出错 在类路径资源[org/apache/camel/spring/boot/actuate/endpoint/CamelRouteControllerEndpointAutoConfiguration.class]中定义:通过方法'routeControllerEndpoint'参数0表示的不满足的依赖关系;嵌套异常是 org.springframework.beans.factory.BeanCreationException:创建类路径资源 [org/apache/camel/spring/boot/CamelAutoConfiguration.class] 中定义的名称为“camelContext”的 bean 时出错:合并 bean 定义的后处理失败; 嵌套异常是 java.lang.IllegalStateException: Failed to introspect Class [org.apache.camel.impl.DefaultCamelContext] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@77556fd] routeControllerEndpoint'参数0;嵌套异常是 org.springframework.beans.factory.BeanCreationException:创建类路径资源 [org/apache/camel/spring/boot/CamelAutoConfiguration.class] 中定义的名称为“camelContext”的 bean 时出错:合并 bean 定义的后处理失败; 嵌套异常是 java.lang.IllegalStateException: Failed to introspect Class [org.apache.camel.impl.DefaultCamelContext] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@77556fd] routeControllerEndpoint'参数0;嵌套异常是 org.springframework.beans.factory.BeanCreationException:创建类路径资源 [org/apache/camel/spring/boot/CamelAutoConfiguration.class] 中定义的名称为“camelContext”的 bean 时出错:合并 bean 定义的后处理失败; 嵌套异常是 java.lang.IllegalStateException: Failed to introspect Class [org.apache.camel.impl.DefaultCamelContext] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@77556fd]
解决方案
推荐阅读
- python - 使用 Spacy 按标记拆分文本
- objective-c - 如何检查应用程序是否具有辅助功能访问权限?
- powershell - Get-ADUser:无法验证参数“身份”。参数为空
- php - Laravel:无法在生产中添加外键约束
- python - Sklearn CountVectorizer token_pattern 允许带有任何字符的字符串
- python - 我想使用其他列中的值替换数据框中的部分列值
- javascript - 在滚动时按类删除元素
- cordova - Google Javascript MAP API 限制的 file:// 引用者是什么
- rest - RESTful 语法。是渴望/懒惰还是两者兼而有之?
- r - 仅在不存在时将文件(图形)添加到目录