我试图在构造函数中使用MeterRegistry对象,但Intelij向我显示了一条消息Could not autowire. No beans of 'MeterRegistry' type found.

我使用了这个依赖项:
implementation group: 'io.micrometer', name: 'micrometer-registry-prometheus', version: '1.3.5'我在application.properties文件中有这些属性
management.endpoint.metrics.enabled=true
management.endpoints.web.exposure.include=*
management.endpoint.prometheus.enabled=true
management.metrics.export.prometheus.enabled=true所以我想知道为什么它不是Spring自动生成的?我错过了什么?
发布于 2021-03-16 00:33:12
您缺少执行器jar : implementation("org.springframework.boot:spring-boot-starter-actuator")
https://stackoverflow.com/questions/65380040
复制相似问题