瀏覽代碼

9.05 失败重试机制bean

Mechrevo 1 年之前
父節點
當前提交
7f11a37e5c
共有 1 個文件被更改,包括 23 次插入0 次删除
  1. 23 0
      sp-core/sp-base/src/main/java/com/pj/retry/FeignConfig.java

+ 23 - 0
sp-core/sp-base/src/main/java/com/pj/retry/FeignConfig.java

@@ -0,0 +1,23 @@
+package com.pj.retry;
+
+import feign.Retryer;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+
+/**
+ * @Author Mechrevo
+ * @Date 2023 09 05 13 56
+ **/
+@Configuration
+public class FeignConfig {
+
+    @Bean
+    public Retryer feignRetryer(){
+        return Retryer.NEVER_RETRY;
+    }
+
+
+
+
+}