Is there any other way to check the health of MongoDB rather than using this.
@Override
public String mongoDbHealthCheck() {
try {
mongoTemplate.executeCommand("{ serverStatus: 1 }");
return "Yes";
}
catch(Exception e) {
log.error(e.getMessage());
return "No";
}
}