Browse Source
# Conflicts: # epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/ExceptionUtils.javadev_shibei_match
11 changed files with 54 additions and 16 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