I just added the 1.12.5 version of the micrometer-registry-prometheus. works very well for me.
<dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> <version>1.12.5</version> </dependency>