package com.jeeplus.flowable.factory;

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

@Slf4j
@Component
public class MonthlyFallbackFactory implements FallbackFactory<MonthlyApi> {

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

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