package com.sptg.third.api.feigns.qinlin.fallback;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.common.core.beans.ResultEnum;
import com.sptg.third.api.feigns.qinlin.QLinAuthFeign;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * Created By lidexi in 2021/1/22
 **/
@Slf4j
@Component
public class QLinAuthFeignFallbackFactory implements FallbackFactory<QLinAuthFeign> {
    @Override
    public QLinAuthFeign create(Throwable throwable) {
        return new QLinAuthFeign() {
            @Override
            public String qLinAuth() {
                log.error(throwable.getMessage(), throwable);
                return null;
            }
        };
    }
}
