Skip to content

Instantly share code, notes, and snippets.

@dalexandrov
Created February 23, 2021 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalexandrov/ca34b4f49e6fa194a078e64d68eff3fd to your computer and use it in GitHub Desktop.
Save dalexandrov/ca34b4f49e6fa194a078e64d68eff3fd to your computer and use it in GitHub Desktop.
Neo4j neo4j = Neo4j.create(config.get("neo4j"));
Neo4jHealthCheck healthCheck = Neo4jHealthCheck.create(neo4j.driver());
Driver neo4jDriver = neo4j.driver();
HealthSupport health = HealthSupport.builder()
.addLiveness(HealthChecks.healthChecks()) // Adds a convenient set of checks
.addReadiness(healthCheck)
.build();
return Routing.builder()
.register(health) // Health at "/health"
//other services
.build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment