AI分析中心服务 监控检查

This commit is contained in:
lxu75
2024-12-24 10:51:41 +08:00
parent 6a79e9036c
commit 7ca12728f9
2 changed files with 29 additions and 6 deletions

View File

@@ -150,7 +150,20 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</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>
<plugins>

View File

@@ -1,16 +1,26 @@
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.RestController;
import javax.servlet.http.HttpServletResponse;
@Slf4j
@Api(value = "健康检查", tags = "健康检查")
@RestController
public class HealthController {
@GetMapping("/actuator/health")
public void healthCheck() {
log.info("health check success");
@GetMapping(value = "/health/check")
@ApiOperation(value = "健康检查")
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);
}
}