package com.tashow.cloud.infraapi.api.config;

import com.tashow.cloud.common.pojo.CommonResult;
import com.tashow.cloud.infraapi.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
/** RPC 服务 - 参数配置 */
public interface ConfigApi {

  String PREFIX = ApiConstants.PREFIX + "/config";

  /** 根据参数键查询参数值 */
  @GetMapping(PREFIX + "/get-value-by-key")
  CommonResult<String> getConfigValueByKey(@RequestParam("key") String key);
}
