
package com.tmerclub.cloud.platform.feign;

import com.tmerclub.cloud.common.dubbo.CoreConfigFeignClient;
import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.platform.service.SysConfigService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author TRACK
 */
@DubboService
public class CoreConfigFeignController implements CoreConfigFeignClient {

    @Autowired
    private SysConfigService sysConfigService;

    @Override
    public ServerResponseEntity<String> getConfig(String key) {
        return ServerResponseEntity.success(sysConfigService.getValue(key));
    }

}
