package com.xueyi.system.api.resource.feign.factory;

import com.xueyi.common.core.web.result.R;
import com.xueyi.system.api.resource.feign.RemoteH5ConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class RemoteH5ConfigFallbackFactory implements FallbackFactory<RemoteH5ConfigService> {
    @Override
    public RemoteH5ConfigService create(Throwable cause) {
        return new RemoteH5ConfigService() {
            @Override
            public R<String> syncH5Config(String tId) {
                return R.fail("同步配置文件失败");
            }
        };
    }
}
