فهرست منبع

加入远程调用的客户端

gaodm 6 سال پیش
والد
کامیت
d2d1b91a6e

+ 13 - 0
prec-service/src/main/java/com/diagbot/client/AiptServiceClient.java

@@ -0,0 +1,13 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.AiptServiceHystrix;
+import org.springframework.cloud.openfeign.FeignClient;
+
+/**
+ * @Description:调用中间层服务
+ * @Author: Mark Huang
+ * @time: 2019/03/25 19:15
+ */
+@FeignClient(value = "aipt-service", fallback = AiptServiceHystrix.class)
+public interface AiptServiceClient {
+}

+ 13 - 0
prec-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -0,0 +1,13 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.TranServiceHystrix;
+import org.springframework.cloud.openfeign.FeignClient;
+
+/**
+ * @Description: 调用信息对接层服务
+ * @author: gaodm
+ * @time: 2019/2/1 17:00
+ */
+@FeignClient(value = "tran-service", fallback = TranServiceHystrix.class)
+public interface TranServiceClient {
+}

+ 15 - 0
prec-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java

@@ -0,0 +1,15 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.client.AiptServiceClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:调用中间层服务
+ * @Author: Mark Huang
+ * @time: 2019/03/25 19:15
+ */
+@Component
+@Slf4j
+public class AiptServiceHystrix implements AiptServiceClient {
+}

+ 16 - 0
prec-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -0,0 +1,16 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.client.TranServiceClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 调用信息对接层服务
+ * @author: gaodm
+ * @time: 2019/2/1 17:00
+ */
+@Component
+@Slf4j
+public class TranServiceHystrix implements TranServiceClient {
+
+}