liujie
2026-06-09 c96fbe6b0aeb413a17c429133ee6d81d138144b9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.xiaopeng.api.factory.maintenance;
 
import com.xiaopeng.api.feignClient.maintenance.XpChargingRecordClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
 
/**
 * 车辆整备Feign客户端降级工厂
 *
 * @author mitao
 * @since 2026-02-11
 */
@Slf4j
@Component
public class XpChargingRecordClientFallbackFactory implements FallbackFactory<XpChargingRecordClient> {
 
    @Override
    public XpChargingRecordClient create(Throwable cause) {
        log.error("车辆整备服务调用失败: {}", cause.getMessage());
        return new XpChargingRecordClient() {
 
        };
    }
}