package com.ruoyi.system.api.factory; import com.ruoyi.common.core.domain.R; import com.ruoyi.system.api.domain.SysConfig; import com.ruoyi.system.api.domain.SysRole; import com.ruoyi.system.api.domain.SysUser; import com.ruoyi.system.api.feignClient.SysConfigClient; import com.ruoyi.system.api.feignClient.SysUserClient; import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.stereotype.Component; import java.util.List; @Component public class SysConfigFallbackFactory implements FallbackFactory { @Override public SysConfigClient create(Throwable cause) { return new SysConfigClient(){ @Override public R getInfo(Long configId) { System.out.println(cause.getMessage()); return R.fail("获取系统配置失败:" + cause.getMessage()); } }; } }