package com.ruoyi.integration.api.factory; import com.ruoyi.integration.api.feignClient.ChargingPileClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.stereotype.Component; /** * 充电桩服务降级处理 * * @author ruoyi */ @Component public class ChargingPileFallbackFactory implements FallbackFactory { private static final Logger log = LoggerFactory.getLogger(ChargingPileFallbackFactory.class); @Override public ChargingPileClient create(Throwable throwable) { log.error("充电桩调用失败:{}", throwable.getMessage()); return new ChargingPileClient() { }; } }