When spring-boot-starter-actuator was introduced, a bug appeared
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2024-02-23T10:01:20.240+08:00 ERROR 39100 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
APPLICATION FAILED TO START
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
net.devh.boot.grpc.client.metrics.MetricsClientInstruments.newClientMetricsMeters(MetricsClientInstruments.java:72)
The following method did not exist:
'io.micrometer.core.instrument.Meter$MeterProvider io.micrometer.core.instrument.Counter$Builder.withRegistry(io.micrometer.core.instrument.MeterRegistry)'
The calling method's class, net.devh.boot.grpc.client.metrics.MetricsClientInstruments, was loaded from the following location:
jar:file:/Users/KohRong/.m2/repository/net/devh/grpc-client-spring-boot-starter/3.0.0.RELEASE/grpc-client-spring-boot-starter-3.0.0.RELEASE.jar!/net/devh/boot/grpc/client/metrics/MetricsClientInstruments.class
The called method's class, io.micrometer.core.instrument.Counter$Builder, is available from the following locations:
jar:file:/Users/KohRong/.m2/repository/io/micrometer/micrometer-core/1.11.8/micrometer-core-1.11.8.jar!/io/micrometer/core/instrument/Counter$Builder.class
The called method's class hierarchy was loaded from the following locations:
io.micrometer.core.instrument.Counter.Builder: file:/Users/KohRong/.m2/repository/io/micrometer/micrometer-core/1.11.8/micrometer-core-1.11.8.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes net.devh.boot.grpc.client.metrics.MetricsClientInstruments and io.micrometer.core.instrument.Counter$Builder
Disconnected from the target VM, address: '127.0.0.1:50818', transport: 'socket'
Process finished with exit code 1
<dependency>
<groupId>net.devh</groupId>
<artifactId>grpc-spring-boot-starter</artifactId>
<version>3.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
spring-boot-starter-parent version: 3.1.8
Tried
The version in question occurs when using the micrometer-core (1.11.8) that comes with spring-boot-starter-parent (3.1.8). The above problem occurs. The micrometer-core 1.12.3 version can be started normally by introducing it separately.
When upgrading to the spring-boot-starter-parent (3.2.2) version, it can start normally without introducing micrometer-core.