Commit 68157830 by 向延琳

里程标椎服务

1 parent 895aaf82
package cn.com.glsx.stdinterface.api;
import cn.com.glsx.stdinterface.factory.FreqRecordFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 新e盾|里程
* @author xiangyanlin
* @date 2022/4/7
*/
@FeignClient(name = "ne-shield-standard-interfaces", path = "/nesi/journey", fallbackFactory = FreqRecordFallbackFactory.class, decode404 = true)
public interface JourneyClient {
}
package cn.com.glsx.stdinterface.factory;
import cn.com.glsx.stdinterface.api.JourneyClient;
import cn.com.glsx.stdinterface.fallback.JourneyFallbackImpl;
import feign.hystrix.FallbackFactory;
/**
* 里程
* @author xiangyanlin
* @date 2022/4/8
*/
public class JourneyFallbackFactory implements FallbackFactory<JourneyClient> {
@Override
public JourneyClient create(Throwable throwable) {
JourneyFallbackImpl fallback = new JourneyFallbackImpl();
fallback.setCause(throwable);
return fallback;
}
}
package cn.com.glsx.stdinterface.fallback;
import cn.com.glsx.stdinterface.api.JourneyClient;
import lombok.Setter;
/**
* @author xiangyanlin
* @date 2022/4/7
*/
public class JourneyFallbackImpl implements JourneyClient {
@Setter
private Throwable cause;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!