How to solve"Failed to register Collector of type MicrometerCollector:cache_removals is already in use by anotherCollector of typeMicrometerCollector"

How to solve " java.lang.IllegalArgumentException: Failed to register Collector of type MicrometerCollector: cache_removals is already in use by another Collector of type MicrometerCollector" with springboot 2.6.6

stack

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.metrics.cache.CacheMetricsRegistrarConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.metrics.cache.CacheMetricsRegistrarConfiguration]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Failed to register Collector of type MicrometerCollector: cache_removals is already in use by another Collector of type MicrometerCollector at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:315)

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.metrics.cache.CacheMetricsRegistrarConfiguration]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Failed to register Collector of type MicrometerCollector: cache_removals is already in use by another Collector of type MicrometerCollector at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:224) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117) at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:311) ... 24 more Caused by: java.lang.IllegalArgumentException: Failed to register Collector of type MicrometerCollector: cache_removals is already in use by another Collector of type MicrometerCollector at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:57) at io.prometheus.client.Collector.register(Collector.java:308) at io.micrometer.prometheus.PrometheusMeterRegistry.lambda$applyToCollector$16(PrometheusMeterRegistry.java:479)

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum