How to collect basic data from Spring into Prometheus
Enabling Actuator in Spring
Add the following to your main program's Maven configuration:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Note the registry version should be compatible with your Spring Boot version, otherwise registration may fail -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
August 30, 2025About 2 min