package cn.datax.service.email.api.feign.factory;

import cn.datax.service.email.api.feign.EmailServiceFeign;
import cn.datax.service.email.api.feign.fallback.EmailServiceFeignFallbackImpl;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class EmailServiceFeignFallbackFactory implements FallbackFactory<EmailServiceFeign> {

    @Override
    public EmailServiceFeign create(Throwable throwable) {
        return new EmailServiceFeignFallbackImpl(throwable);
    }

}
