35 lines
1.1 KiB
Java
35 lines
1.1 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 = "尾程服务状态",
|
|
description = "尾程服务可用性接口"
|
|
)
|
|
@RestController
|
|
@RequestMapping("/api/platform/v1/last-leg")
|
|
public class LastlegHealthController {
|
|
@Operation(
|
|
summary = "查询服务状态",
|
|
description = "返回尾程服务边界的逻辑运行状态"
|
|
)
|
|
@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"));
|
|
}
|
|
}
|