From 325d2fbc3d907dcf3f574d8e1f30d0269ddc1937 Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期三, 24 七月 2024 08:28:47 +0800 Subject: [PATCH] 1、请求租户不存在时,记录访问日志、操作日志异常的问题 2、LoginUser 新增过期时间,方便判断 token 过期 3、增加 ConfigApi,支持参数配置的读取 --- iailab-module-infra/iailab-module-infra-api/src/main/java/com/iailab/module/infra/api/config/ConfigApi.java | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 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..d1f4dd2 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,20 @@ 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 { - @Operation(summary = "Feign接口-查询配置参数") - @GetMapping("/api/feign/infra-config/{configCode}") - String queryConfigByCode(@PathVariable("configCode") String configCode); + String PREFIX = ApiConstants.PREFIX + "/config"; + + @GetMapping(PREFIX + "/get-value-by-key") + @Operation(summary = "根据参数键查询参数值") + CommonResult<String> getConfigValueByKey(@RequestParam("key") String key); } -- Gitblit v1.9.3