AI分析中心服务 监控检查
This commit is contained in:
@@ -150,6 +150,19 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user