简体   繁体   中英

required a bean of type 'io.micrometer.core.instrument.MeterRegistry' that could not be found

Recently we upgraded spring-boot version to 2.7.2 and spring framework version to 5.3.22. Since then we are seeing this error in one of the apps

"required a bean of type 'io.micrometer.core.instrument.MeterRegistry' that could not be found."

Spring documentation says that if there is a dependency called micrometer-registry-<?> then it will autowire the required MeterRegistry. We do have that dependency in out project. But it is not happening.

We do have the following properties in application.yml. But actuator is also not working

management:
  metrics:
    export:
      statsd:
        enabled: true
        flavor: datadog
        host: localhost
        port: 8125
  endpoints:
    web:
      exposure:
        include: "*"
  metrics:
    enabled: true

Can some one please tell me what i am missing here?

You need spring-boot-starter-actuator on your classpath.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM