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