<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
This will add several useful endpoints to your application. One of them is /health. When you start your application and navigate to the /health endpoint you will see it returns already some data.
{
"status":"UP",
"diskSpace": {
"status":"UP",
"free":56443746,
"threshold":1345660
}
}
How to add a custom health check in spring boot health?