package com.ruoyi.other.api.factory; import com.ruoyi.common.core.domain.R; import com.ruoyi.other.api.domain.BaseSetting; import com.ruoyi.other.api.feignClient.BaseSettingClient; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.openfeign.FallbackFactory; @Slf4j public class BaseSettingClientFallbackFactory implements FallbackFactory { @Override public BaseSettingClient create(Throwable cause) { return new BaseSettingClient(){ @Override public R getBaseSetting(Integer id) { return R.fail("获取基础配置失败:" + cause.getMessage()); } }; } }