forked from luyan/epmet-cloud-lingshan
				
			
				 5 changed files with 31 additions and 12 deletions
			
			
		@ -1,17 +1,17 @@ | 
				
			|||
package com.epmet.feign; | 
				
			|||
package com.epmet.dataaggre.feign; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
import com.epmet.commons.tools.constant.ServiceConstant; | 
				
			|||
import com.epmet.commons.tools.utils.Result; | 
				
			|||
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO; | 
				
			|||
import com.epmet.feign.impl.DataAggregatorFeignClientClientFallBackFactory; | 
				
			|||
import com.epmet.dataaggre.feign.impl.DataAggregatorOpenFeignClientFallbackFactory; | 
				
			|||
import org.springframework.cloud.openfeign.FeignClient; | 
				
			|||
import org.springframework.web.bind.annotation.PostMapping; | 
				
			|||
import org.springframework.web.bind.annotation.RequestBody; | 
				
			|||
 | 
				
			|||
@FeignClient(name = ServiceConstant.DATA_AGGREGATOR_SERVER, fallback = DataAggregatorFeignClientClientFallBackFactory.class) | 
				
			|||
// @FeignClient(name = ServiceConstant.DATA_AGGREGATOR_SERVER, fallback= DataAggregatorFeignClientClientFallBackFactory.class,url = "localhost:8114")
 | 
				
			|||
public interface DataAggregatorFeignClient { | 
				
			|||
// @FeignClient(name = ServiceConstant.DATA_AGGREGATOR_SERVER, fallbackFactory = DataAggregatorOpenFeignClientFallbackFactory.class)
 | 
				
			|||
@FeignClient(name = ServiceConstant.DATA_AGGREGATOR_SERVER, fallbackFactory= DataAggregatorOpenFeignClientFallbackFactory.class,url = "localhost:8114") | 
				
			|||
public interface DataAggregatorOpenFeignClient { | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 定时任务导出网格活跃统计表 | 
				
			|||
@ -0,0 +1,17 @@ | 
				
			|||
package com.epmet.dataaggre.feign.impl; | 
				
			|||
 | 
				
			|||
import com.epmet.dataaggre.feign.DataAggregatorOpenFeignClient; | 
				
			|||
import feign.hystrix.FallbackFactory; | 
				
			|||
import lombok.extern.slf4j.Slf4j; | 
				
			|||
import org.springframework.stereotype.Component; | 
				
			|||
 | 
				
			|||
@Slf4j | 
				
			|||
@Component | 
				
			|||
public class DataAggregatorOpenFeignClientFallbackFactory implements FallbackFactory<DataAggregatorOpenFeignClient> { | 
				
			|||
    private DataAggregatorOpenFeignClientFallback fallback = new DataAggregatorOpenFeignClientFallback(); | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public DataAggregatorOpenFeignClient create(Throwable throwable) { | 
				
			|||
        return null; | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
					Loading…
					
					
				
		Reference in new issue