<p>So this is my configuration in application.yaml:</p>
<pre><code>management:
  endpoint:
    health:
      show-details: &quot;ALWAYS&quot;
      probes:
        enabled: true
  endpoints:
    enabled-by-default: true
    web:
      exposure:
        include: metrics, health, caches, restart
</code></pre>
<p>And according to documentations this should be enough for enabling liveness and readiness probe for a spring application. But the endpoints (<code>/actuator/health/liveness</code> and <code>/actuator/health/readiness</code>) are still returning 404. I tried many combinations in the config, but nothing works. Can you please tell me what to do about this?</p>

Nariman Esmaiely Fard
<p>I dug a bit deeper in this issue as I found it as an interesting feature of <code>spring-boot-actuator</code>.
From my research I found out that this feature with <code>liveness</code> and <code>readiness</code> has been introduced in <code>spring-boot:2.3.0</code> so if you're using an older version this might be the reason you're not receiving the expected result when you do a <code>GET /actuator/health/readiness</code>.</p>
<p>If you upgrade your <code>spring-boot</code> version to &gt;= <strong>2.3.0</strong> you can enable the liveness and readiness probes by adding:</p>
<pre><code>management:
  health:
    probes:
      enabled: true
</code></pre>
<p>to your <strong>application.yaml</strong> file.
After doing so you should be able to</p>
<p><code>GET /actuator/health</code></p>
<pre><code>{
    &quot;status&quot;: &quot;UP&quot;,
    &quot;groups&quot;: [
        &quot;liveness&quot;,
        &quot;readiness&quot;
    ]
}
</code></pre>
<p>However for spring-boot versions &gt;= 2.3.2 it is advised to enable probes by using the following in your application.yaml</p>
<pre><code>management:
  endpoint:
    health:
      probes:
        enabled: true 
</code></pre>
<p>The reason for doing so is a bug which you can read more about <a href="https://github.com/spring-projects/spring-boot/issues/22107" rel="noreferrer">here</a></p>
<p><strong>Extra tip</strong>: If you're <code>spring-boot</code> version &gt;= 2.3.0, you've configured your application.yaml file accordingly and you still receive <strong>404</strong> when you <code>GET /actuator/health/liveness</code> there's a slim chance that your application.yaml file is not getting picked up by the Spring Context. You can check if this is the case by changing the port of the application</p>
<pre><code>server:
  port: 8081
</code></pre>
<p>If your application doesn't start on a different port, it is safe to say that none of your configurations have taken place.
I had this issue one or two times with my IDE.</p>
