Forráskód Böngészése

调用信息对接层服务

gaodm 6 éve
szülő
commit
61cffb0b28

+ 15 - 0
icss-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -0,0 +1,15 @@
+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 {
+//    @PostMapping(value = "/web/doc/algorithm/neural")
+//    Response<ResponseData> bayesPageData(@RequestBody SearchData searchData);
+}

+ 20 - 0
icss-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -0,0 +1,20 @@
+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 {
+//    @Override
+//    public Response<ResponseData> bayesPageData(SearchData searchData) {
+//        log.error("【hystrix】调用{}异常", "bayesPageData");
+//        return null;
+//    }
+}