tôi đã viết một REST Gọi đó sẽ trở lại tình trạng sức khỏe khi gọiXuân Nghỉ ngơi Dịch vụ Gọi trở về lỗi trên dòng 1 ở cột 1: Tài liệu rỗng
@RestController
@RequestMapping(value = "/account")
public class HealthCheckController {
protected final Logger log = LoggerFactory.getLogger(this.getClass());
@RequestMapping(value = "/health", method = RequestMethod.GET, produces = { "application/json" })
@ResponseStatus(HttpStatus.OK)
@ApiOperation(value = "Returns the health status of the application", notes = "Load balancer user this to confirm the health of the node")
public @ResponseBody String getHealth(HttpServletRequest request, HttpServletResponse response) throws Exception {
log.info("***" + RequestCorrelation.getId() + "***" + "HealthCheckController - getHealth() Called");
return "{\"health\":{\"SERVICES\":\"OK\"}}";
}
}
Khi tôi mở này trong vênh vang hoặc đưa thư nó sẽ trả về phản ứng thích hợp . Nhưng khi tôi nhấn URL này trong trình duyệt chrome, tôi đang thấy
Tại sao vậy? và cách khắc phục điều này?