Reputation: 1625
Config: springCloudVersion = 'Finchley.SR1' springBootVersion = '2.0.2.RELEASE'
Getting below error:
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.metrics.CounterService
There is no CounterService class in this release of spring-starter-actuator-2.0.2.RELEASE?? Ref: https://docs.spring.io/spring-boot/docs/2.0.2.RELEASE/api/
Upvotes: 1
Views: 3114
Reputation: 2699
Yes, CounterService is been removed in SpringBoot 2.0.
We faced the same issue and we used MeterRegistry
from micrometer instead of CounterService
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
Please refer migration guide here
Upvotes: 5