5 changed files with 35 additions and 2 deletions
			
			
		| @ -0,0 +1,20 @@ | |||||
|  | package com.epmet.feign.impl; | ||||
|  | 
 | ||||
|  | import com.epmet.commons.tools.exception.ExceptionUtils; | ||||
|  | import com.epmet.feign.DataStatisticalOpenFeignClient; | ||||
|  | import feign.hystrix.FallbackFactory; | ||||
|  | import lombok.extern.slf4j.Slf4j; | ||||
|  | import org.springframework.stereotype.Component; | ||||
|  | 
 | ||||
|  | @Component | ||||
|  | @Slf4j | ||||
|  | public class DataStatisticalOpenFeignClientFallBackFactory implements FallbackFactory<DataStatisticalOpenFeignClient> { | ||||
|  | 
 | ||||
|  |     private DataStatisticalOpenFeignClientFallBack fallback = new DataStatisticalOpenFeignClientFallBack(); | ||||
|  | 
 | ||||
|  |     @Override | ||||
|  |     public DataStatisticalOpenFeignClient create(Throwable cause) { | ||||
|  |         log.error(ExceptionUtils.getThrowableErrorStackTrace(cause));//自己写的工具类
 | ||||
|  |         return fallback; | ||||
|  |     } | ||||
|  | } | ||||
					Loading…
					
					
				
		Reference in new issue