puzhibing
2026-03-11 c98d3f2fc620b3f5d699e2be34eaabc1033b42b2
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.XpVehiclePreparationClient;
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 XpVehiclePreparationClientFallbackFactory implements FallbackFactory<XpVehiclePreparationClient> {
 
    @Override
    public XpVehiclePreparationClient create(Throwable cause) {
        log.error("车辆整备服务调用失败: {}", cause.getMessage());
        return new XpVehiclePreparationClient() {
 
        };
    }
}