use of org.apereo.cas.monitor.MongoDbHealthIndicator in project cas by apereo.
the class MongoDbMonitoringConfiguration method mongoHealthIndicator.
@Bean
public HealthIndicator mongoHealthIndicator() {
final MongoDbConnectionFactory factory = new MongoDbConnectionFactory();
final MonitorProperties.MongoDb mongoProps = casProperties.getMonitor().getMongo();
final MongoTemplate mongoTemplate = factory.buildMongoTemplate(mongoProps);
return new MongoDbHealthIndicator(mongoTemplate, casProperties);
}
Aggregations