35 lines
1.3 KiB
Java
35 lines
1.3 KiB
Java
package com.baiyue.lastleg.controller;
|
|||
|
|
|
||
|
|
import com.baiyue.common.core.api.ApiResponse;
|
||
|
|
import io.swagger.v3.oas.annotations.Operation;
|
||
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
|
||
|
|
import java.util.Map;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 尾程预留服务状态接口,用于验证尾程服务边界及基础可用性。
|
||
|
|
*/
|
||
|
|
@Tag(
|
||
|
|
name = "Last-leg service status / 尾程服务状态",
|
||
|
|
description = "Last-leg reserved service availability API. / 尾程预留服务的可用性接口。"
|
||
|
|
)
|
||
|
|
@RestController
|
||
|
|
@RequestMapping("/api/platform/v1/last-leg")
|
||
|
|
public class LastlegHealthController {
|
||
|
|
@Operation(
|
||
|
|
summary = "Get service status / 查询服务状态",
|
||
|
|
description = "Returns the logical status of the reserved lastleg-service boundary. / 返回预留 lastleg-service 边界的逻辑运行状态。"
|
||
|
|
)
|
||
|
|
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||
|
|
responseCode = "200",
|
||
|
|
description = "Service is available / 服务可用"
|
||
|
|
)
|
||
|
|
@GetMapping("/status")
|
||
|
|
public ApiResponse<Map<String, String>> status() {
|
||
|
|
return ApiResponse.success(Map.of("service", "lastleg-service", "status", "UP"));
|
||
|
|
}
|
||
|
|
}
|