forked from rongchao/epmet-cloud-rizhao
				
			
				 4 changed files with 59 additions and 0 deletions
			
			
		| @ -0,0 +1,16 @@ | |||
| package com.epmet.feign; | |||
| 
 | |||
| import com.epmet.commons.tools.constant.ServiceConstant; | |||
| import com.epmet.feign.fallback.EpmetUserFeignClientFallBack; | |||
| import org.springframework.cloud.openfeign.FeignClient; | |||
| 
 | |||
| /** | |||
|  * @Description 调用epmet-user服务 | |||
|  * @Author sun | |||
|  */ | |||
| @FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserFeignClientFallBack.class) | |||
| public interface EpmetUserFeignClient { | |||
| 
 | |||
| 
 | |||
| 
 | |||
| } | |||
| @ -0,0 +1,17 @@ | |||
| package com.epmet.feign; | |||
| 
 | |||
| 
 | |||
| import com.epmet.commons.tools.constant.ServiceConstant; | |||
| import com.epmet.feign.fallback.GovOrgFeignClientFallBack; | |||
| import org.springframework.cloud.openfeign.FeignClient; | |||
| 
 | |||
| 
 | |||
| /** | |||
|  * @Description 调用gov-org-server | |||
|  * @Author sun | |||
|  */ | |||
| @FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class) | |||
| public interface GovOrgFeignClient { | |||
| 
 | |||
| 
 | |||
| } | |||
| @ -0,0 +1,13 @@ | |||
| package com.epmet.feign.fallback; | |||
| 
 | |||
| import com.epmet.feign.EpmetUserFeignClient; | |||
| import org.springframework.stereotype.Component; | |||
| 
 | |||
| /** | |||
|  * @Description 调用epmet-user服务 | |||
|  * @Author sun | |||
|  */ | |||
| @Component | |||
| public class EpmetUserFeignClientFallBack implements EpmetUserFeignClient { | |||
| 
 | |||
| } | |||
| @ -0,0 +1,13 @@ | |||
| package com.epmet.feign.fallback; | |||
| 
 | |||
| import com.epmet.feign.GovOrgFeignClient; | |||
| import org.springframework.stereotype.Component; | |||
| 
 | |||
| /** | |||
|  * @Description 调用gov-org-server | |||
|  * @Author sun | |||
|  */ | |||
| @Component | |||
| public class GovOrgFeignClientFallBack implements GovOrgFeignClient { | |||
| 
 | |||
| } | |||
					Loading…
					
					
				
		Reference in new issue