I was upgrading spring boot to 2 in one of the project. I am facing issue with @Autowire metricRegistry:MetricRegistry
I had read upgrade guide where it is mentioned that Metrics are replaced by Micrometer's MeterRegistry.
Since, Dropwizard MetricRegistry is havely used in current project, it is difficult to replace it.
Is there any possibility to use Dropwizard MetricRegistry with spring boot 2 and @Autowire metricRegistry:MetricRegistry get work?
extractDataSource(@Autowire metricRegistry:MetricRegistry) {DataSource ds = ABC_Class.build(metricRegistry);}While ABC_Class has build method as followsHikariDataSource build(metricRegistry:Option[MetricRegistry]) {HikariDataSource ds....metricRegistry.foreeach(ds.setMetricRegistry)}