@ RequestMapping ( value = VERSION_URL , method = RequestMethod . GET ) public ResponseEntity < VersionMonitor > version ( ) throws IOException { try { final VersionMonitor monitor = VersionMonitor . getVersion ( MonitorController . class ) ; return new ResponseEntity <> ( monitor , HttpStatus . OK ) ; } catch ( IOException ex ) { LOGGER . error ( "Unable to read manifest file" , ex ) ; throw new IOException ( "Unable to read manifest file" , ex ) ; } }
Uses Crafter Commons Status Version POJO to get current Deployment and JVM runtime and version information .