java - SpringMVC check server is UP or DOWN -


how can check if server or down in springmvc or simple in java? want simple function how receiving url parameter , return 1 boolean variable true or false represents server.

@restcontroller public class healthcheckcontroller {     @requestmapping("/healthcheck")     public greeting greeting() {         return "up";     } } 

when have check if server send request /healthcheck. if returns "up", you're ok.

if use spring boot, can take @ actuator. allows functionality out of box plus other stuff datasource checking , on


Comments