7 changed files with 98 additions and 0 deletions
			
			
		| @ -0,0 +1,17 @@ | |||||
|  | /** | ||||
|  |  * Copyright (c) 2018 人人开源 All rights reserved. | ||||
|  |  * <p> | ||||
|  |  * https://www.renren.io
 | ||||
|  |  * <p> | ||||
|  |  * 版权所有,侵权必究! | ||||
|  |  */ | ||||
|  | 
 | ||||
|  | package com.epmet.constant; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * 常量 | ||||
|  |  * @author sun | ||||
|  |  * @since 1.0.0 | ||||
|  |  */ | ||||
|  | public interface IssueConstant { | ||||
|  | } | ||||
| @ -0,0 +1,14 @@ | |||||
|  | 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服务 | ||||
|  |  * @Author sun | ||||
|  |  * , url = "localhost:8092" | ||||
|  |  */ | ||||
|  | @FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class) | ||||
|  | public interface GovOrgFeignClient { | ||||
|  | } | ||||
| @ -0,0 +1,14 @@ | |||||
|  | package com.epmet.feign; | ||||
|  | 
 | ||||
|  | import com.epmet.commons.tools.constant.ServiceConstant; | ||||
|  | import com.epmet.feign.fallback.MessageFeignClientFallback; | ||||
|  | import org.springframework.cloud.openfeign.FeignClient; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * @Description 调用epmet-message服务 | ||||
|  |  * @Author sun | ||||
|  |  * , url = "localhost:8085" | ||||
|  |  */ | ||||
|  | @FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallback = MessageFeignClientFallback.class) | ||||
|  | public interface MessageFeignClient { | ||||
|  | } | ||||
| @ -0,0 +1,14 @@ | |||||
|  | package com.epmet.feign; | ||||
|  | 
 | ||||
|  | import com.epmet.commons.tools.constant.ServiceConstant; | ||||
|  | import com.epmet.feign.fallback.ResiGroupFeignClientFallBack; | ||||
|  | import org.springframework.cloud.openfeign.FeignClient; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * @Description 调用resi-group服务 | ||||
|  |  * @Author sun | ||||
|  |  * , url = "localhost:8095" | ||||
|  |  */ | ||||
|  | @FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupFeignClientFallBack.class) | ||||
|  | public interface ResiGroupFeignClient { | ||||
|  | } | ||||
| @ -0,0 +1,12 @@ | |||||
|  | package com.epmet.feign.fallback; | ||||
|  | 
 | ||||
|  | import com.epmet.feign.GovOrgFeignClient; | ||||
|  | import org.springframework.stereotype.Component; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * @Description 调用gov-org服务 | ||||
|  |  * @Author sun | ||||
|  |  */ | ||||
|  | @Component | ||||
|  | public class GovOrgFeignClientFallBack implements GovOrgFeignClient { | ||||
|  | } | ||||
| @ -0,0 +1,15 @@ | |||||
|  | package com.epmet.feign.fallback; | ||||
|  | 
 | ||||
|  | import com.epmet.commons.tools.constant.ServiceConstant; | ||||
|  | import com.epmet.commons.tools.utils.ModuleUtils; | ||||
|  | import com.epmet.commons.tools.utils.Result; | ||||
|  | import com.epmet.feign.MessageFeignClient; | ||||
|  | import org.springframework.stereotype.Component; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * @Description 调用epmet-message服务 | ||||
|  |  * @Author sun | ||||
|  |  */ | ||||
|  | @Component | ||||
|  | public class MessageFeignClientFallback implements MessageFeignClient { | ||||
|  | } | ||||
| @ -0,0 +1,12 @@ | |||||
|  | package com.epmet.feign.fallback; | ||||
|  | 
 | ||||
|  | import com.epmet.feign.ResiGroupFeignClient; | ||||
|  | import org.springframework.stereotype.Component; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * @Description 调用resi-group服务 | ||||
|  |  * @Author sun | ||||
|  |  */ | ||||
|  | @Component | ||||
|  | public class ResiGroupFeignClientFallBack implements ResiGroupFeignClient { | ||||
|  | } | ||||
					Loading…
					
					
				
		Reference in new issue