AI分析中心服务 监控检查
This commit is contained in:
@@ -150,7 +150,20 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
|
||||||
|
<!--volvo-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.volvo</groupId>
|
||||||
|
<artifactId>volvo-common-core</artifactId>
|
||||||
|
<version>1.0.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.volvo</groupId>
|
||||||
|
<artifactId>volvo-common-feign</artifactId>
|
||||||
|
<version>1.0.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|||||||
@@ -1,16 +1,26 @@
|
|||||||
package com.volvo.ai.analytic.center.controller;
|
package com.volvo.ai.analytic.center.controller;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import com.volvo.common.core.util.ResultMsg;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
@Slf4j
|
@Api(value = "健康检查", tags = "健康检查")
|
||||||
@RestController
|
@RestController
|
||||||
public class HealthController {
|
public class HealthController {
|
||||||
|
|
||||||
@GetMapping("/actuator/health")
|
@GetMapping(value = "/health/check")
|
||||||
public void healthCheck() {
|
@ApiOperation(value = "健康检查")
|
||||||
log.info("health check success");
|
public void healthCheck(HttpServletResponse response) {
|
||||||
|
response.setStatus(HttpServletResponse.SC_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/health/check/test")
|
||||||
|
@ApiOperation(value = "健康检查测试")
|
||||||
|
public ResultMsg<Boolean> healthCheckTest(HttpServletResponse response) {
|
||||||
|
return ResultMsg.ok(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user