package com.ruoyi.system.api.factory; import com.ruoyi.common.core.domain.R; import com.ruoyi.system.api.feignClient.JianGuanSystemClient; import com.ruoyi.system.api.vo.GovernmentCloudSystemVO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; /** * * @author ruoyi */ @Component public class JianGuanSystemFallbackFactory implements org.springframework.cloud.openfeign.FallbackFactory { private static final Logger log = LoggerFactory.getLogger(JianGuanSystemClient.class); @Override public JianGuanSystemClient create(Throwable throwable) { log.error("政务云查询数据接口:{}", throwable.getMessage()); return new JianGuanSystemClient() { @Override public R listAll() { return R.fail("政务云查询数据接口System:" + throwable.getMessage()); } }; } }