@RequestMapping(method = RequestMethod.GET, produces = { ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE}) @ResponseBody public Object invoke(HttpServletRequest request) { if (!getDelegate().isEnabled()) { // Shouldn't happen because the request mapping should not be registered return getDisabledResponse(); } Health health = getDelegate().invoke(); HttpStatus status = this.statusMapping.get(health.getStatus().getCode()); if (status != null) { return new ResponseEntity<>(health, status); } return health; }
@GetMapping(value = "/{name:.*}", produces = {ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE}) @ResponseBody @HypermediaDisabled public String handle(@PathVariable String name) { String temp = name; if (name.contains(".")) { temp = name.substring(0, name.indexOf(".")); } name = "/" + temp + ".json"; return statService.service(name); }