private Health getHealth(Principal principal) { long accessTime = System.currentTimeMillis(); if (isCacheStale(accessTime)) { this.lastAccess = accessTime; this.cached = this.delegate.invoke(); } if (exposeHealthDetails(principal)) { return this.cached; } return Health.status(this.cached.getStatus()).build(); }
@Bean HealthIndicator healthIndicator() { return () -> Health.status("I <3 RWX & Ft. Lauderdale").build(); }