Package org.springframework.boot.actuate.health

Examples of org.springframework.boot.actuate.health.MongoHealthIndicator


    @Bean
    @ConditionalOnMissingBean(name = "mongoHealthIndicator")
    public HealthIndicator mongoHealthIndicator() {
      if (this.mongoTemplates.size() == 1) {
        return new MongoHealthIndicator(this.mongoTemplates.values().iterator()
            .next());
      }

      CompositeHealthIndicator composite = new CompositeHealthIndicator(
          this.healthAggregator);
      for (Map.Entry<String, MongoTemplate> entry : this.mongoTemplates.entrySet()) {
        composite.addHealthIndicator(entry.getKey(), new MongoHealthIndicator(
            entry.getValue()));
      }
      return composite;
    }
View Full Code Here

TOP

Related Classes of org.springframework.boot.actuate.health.MongoHealthIndicator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.