Browse Source

健康检查:改良

dev_shibei_match
wxz 4 years ago
parent
commit
1b28edaeee
  1. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/healthcheck/HealthCheckController.java

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/healthcheck/HealthCheckController.java

@ -2,6 +2,7 @@ package com.epmet.healthcheck;
import com.epmet.commons.tools.utils.IpUtils; import com.epmet.commons.tools.utils.IpUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -11,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
@RestController @RestController
@RequestMapping("healthcheck") @RequestMapping("healthcheck")
@Slf4j
public class HealthCheckController { public class HealthCheckController {
/** /**
@ -20,6 +22,7 @@ public class HealthCheckController {
@PostMapping("http") @PostMapping("http")
public Result httpHealthCheck(HttpServletRequest request) { public Result httpHealthCheck(HttpServletRequest request) {
String serverName = request.getServerName(); String serverName = request.getServerName();
log.info("健康检查:serverName:{}", serverName);
return new Result().ok(serverName); return new Result().ok(serverName);
} }

Loading…
Cancel
Save