Getting the below Exception while trying to upgrade to spring boot version 2.7.11 fro existing Spring Boot version 2.2.6.RELEASE
Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'webMvcMetricsFilter' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/web/servlet/WebMvcMetricsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'webMvcMetricsFilter' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'prometheusMeterRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusMetricsExportAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.micrometer.prometheus.PrometheusMeterRegistry]: Factory method 'prometheusMeterRegistry' threw exception; nested exception is java.lang.NoSuchMethodError: 'void io.micrometer.prometheus.PrometheusMeterRegistry.<init>(io.micrometer.prometheus.PrometheusConfig, io.prometheus.client.CollectorRegistry, io.micrometer.core.instrument.Clock, io.prometheus.client.exemplars.ExemplarSampler)'
Upgrade should work seamlessly from spring Boot version 2.2.6.RELEASE to Spring Boot version 2.7.11. However Prometheus is continuously failing . I have below configuration
compile("org.springframework.boot:spring-boot-starter-actuator")
// https://mvnrepository.com/artifact/io.prometheus/simpleclient
implementation group: 'io.prometheus', name: 'simpleclient', version: '0.16.0'
// https://mvnrepository.com/artifact/io.prometheus.jmx/collector
implementation group: 'io.prometheus.jmx', name: 'collector', version: '0.18.0'
// https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus
implementation group: 'io.micrometer', name: 'micrometer-registry-prometheus', version: '1.11.0'
Existing Configuration 2.2.2.RELEASE
implementation group: 'org.springframework', name: 'spring-aspects', version: '5.3.27' implementation group: 'org.springframework', name: 'spring-core', version: '5.3.27' implementation group: 'org.springframework', name: 'spring-beans', version: '5.3.27' compile("org.springframework.boot:spring-boot-starter-actuator") implementation group: 'io.micrometer', name: 'micrometer-core', version: '1.5.5'