luoyb
2021-04-15 df489701802ac39013a2d29c9b6e01e7f905bba7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package cc.mrbird.febs.server.hr.feign.fallback;
 
import cc.mrbird.febs.common.core.annotation.Fallback;
import cc.mrbird.febs.server.hr.feign.IRemotePositionService;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
 
/**
 * @author MrBird
 */
@Slf4j
@Fallback
public class RemotePositionServiceFallback implements FallbackFactory<IRemotePositionService> {
 
    @Override
    public IRemotePositionService create(Throwable throwable) {
        return () -> {
            log.error("feign获取岗位异常",throwable);
            return null;
        };
    }
}