title: Spring Boot custom health indicator not showing up
body: <p>I believe followed almost all tutorials on the Internet and read many SO answers and still I'm stuck.</p>
  
  <h3>1. A simple health check</h3>
  
  <pre class="lang-java prettyprint-override"><code>@Component
  public class HealthCheck implements HealthIndicator {
  
      @Override
      public Health health() {
          return Health.up().build();
      }
  
  }
  </code></pre>
  
  <h3>2. Application.yaml is configured to show all details:</h3>
  
  <pre><code>management.endpoints.web.exposure.include: "*"
  management.endpoint.health.show-details: ALWAYS
  </code></pre>
  
  <h3>3. Spring-boot-actuator included as dependency:</h3>
  
  <pre><code>    implementation 'org.springframework.boot:spring-boot-starter-actuator'
      implementation 'org.springframework.boot:spring-boot-starter-web'
  </code></pre>
  
  <h3>4. Spring boot of recent release:</h3>
  
  <pre><code>id 'org.springframework.boot' version '2.2.0.RELEASE'
  </code></pre>
  
  <h3>5. Main application class is annotated with <code>@SpringBootApplication</code> (which implicitly brings <code>@ComponentScan</code>).</h3>
  
  <pre class="lang-java prettyprint-override"><code>@SpringBootApplication
  public class PaymentServiceApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(PaymentServiceApplication.class, args);
      }
  
  }
  </code></pre>
  
  <p>My custom health check has to test for Apache Kafka, but I skipped the details for brevity. 
  Still, invoking <code>/actuator/health</code> endpoint I get the same default result:</p>
  
  <pre><code>{
      "status": "UP",
      "components": {
          "diskSpace": {
              "status": "UP",
              "details": {
                  "total": 250685575168,
                  "free": 99168997376,
                  "threshold": 10485760
              }
          },
          "ping": {
              "status": "UP"
          }
      }
  }
  </code></pre>
  
  <p>Is there anything I may have missed?</p>