package com.jeeplus.flowable.factory;

import com.jeeplus.flowable.feign.RegularApplyApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ApplyFallbackFactory implements FallbackFactory<RegularApplyApi> {

    @Override
    public RegularApplyApi create(Throwable cause) {
        log.error ( "嘉溢项目服务调用失败:{}", cause.getMessage ( ) );
        return new RegularApplyApi(){


            @Override
            public String getList() {
                return null;
            }
        };
    }
}
