From 81ce77b2e152ffbedd61d3a768b5b292701a7c64 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期五, 03 一月 2025 10:21:23 +0800 Subject: [PATCH] 动态数据长度 --- iailab-module-infra/iailab-module-infra-api/src/main/java/com/iailab/module/infra/api/config/ConfigApi.java | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/iailab-module-infra/iailab-module-infra-api/src/main/java/com/iailab/module/infra/api/config/ConfigApi.java b/iailab-module-infra/iailab-module-infra-api/src/main/java/com/iailab/module/infra/api/config/ConfigApi.java index 2d41a26..e386926 100644 --- a/iailab-module-infra/iailab-module-infra-api/src/main/java/com/iailab/module/infra/api/config/ConfigApi.java +++ b/iailab-module-infra/iailab-module-infra-api/src/main/java/com/iailab/module/infra/api/config/ConfigApi.java @@ -1,17 +1,25 @@ package com.iailab.module.infra.api.config; +import com.iailab.framework.common.pojo.CommonResult; import com.iailab.module.infra.enums.ApiConstants; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; -@FeignClient(name = ApiConstants.NAME) -@Tag(name = "配置文件") +@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = +@Tag(name = "RPC 服务 - 参数配置") public interface ConfigApi { + + String PREFIX = ApiConstants.PREFIX + "/config"; @Operation(summary = "Feign接口-查询配置参数") @GetMapping("/api/feign/infra-config/{configCode}") String queryConfigByCode(@PathVariable("configCode") String configCode); + + @GetMapping(PREFIX + "/get-value-by-key") + @Operation(summary = "根据参数键查询参数值") + CommonResult<String> getConfigValueByKey(@RequestParam("key") String key); + } -- Gitblit v1.9.3