I tried using the spring-boot-starter-actuator dependency, but it is displaying other irrelevant details too. I tried keeping a static variable but that didn\'t work as ther