title: Springboot health check is always down
body: <p>I am using spring boot health. I just want to make it up every time. So i add below,</p>
  
  <pre><code>@Component
  public class AggregationHealth implements HealthIndicator { 
      @Override
      public Health health() {
          Health health = Health.up().build();
          logger.info("----------------------------Health status : " + health.getStatus() + "----------------------------");
          return health;
      }
  }
  </code></pre>
  
  <p>The log show status Up but when i access my application using below url it says Down.</p>
  
  <pre><code>http://localhost:8085/health
  </code></pre>
  
  <p>I also added below in my pom.xml,</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Edit:</p>
  
  <p>Once i add <code>"endpoints.health.sensitive=false"</code> it gives me below descriptive error,</p>
  
  <pre><code>{
    "status": "DOWN",
    "aggregationHealth": {
      "status": "UP"
    },
    "diskSpace": {
      "status": "UP",
      "free": 371498577920,
      "threshold": 10485760
    },
    "mongo": {
      "status": "DOWN",
      "error": "org.springframework.dao.DataAccessResourceFailureException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused by {java.net.ConnectException: Connection refused: connect}}]; nested exception is com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused by {java.net.ConnectException: Connection refused: connect}}]"
    }
  }
  </code></pre>
  
  <p>So i since the mongo is down, i add a mongo db details in my application.properties file. But my question is, my service does not need a mongodb. 
  I even add <code>spring.data.mongodb.repositories.enabled=false</code> too.
  In that case how can i make the health Up with out specify mongo details?</p>