RemoteConfigValueService.java 813 Bytes
package com.huaheng.config.api;

import com.huaheng.common.core.config.FeignTokenInterceptor;
import com.huaheng.common.core.constant.ServiceNameConstants;
import com.huaheng.config.api.domain.ConfigValue;
import com.huaheng.config.api.factory.RemoteConfigValueFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@FeignClient(contextId = "remoteConfigValueService", value = ServiceNameConstants.CONFIG_SERVICE,
        fallbackFactory = RemoteConfigValueFallbackFactory.class, configuration = FeignTokenInterceptor.class)
public interface RemoteConfigValueService {

    @PostMapping(value = "/configValue/getByType")
    ConfigValue getConfigByModuleType(@RequestParam("moduleType") String moduleType);
}