索赔检核,retry机制
This commit is contained in:
@@ -19,7 +19,10 @@
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.retry</groupId>
|
||||
<artifactId>spring-retry</artifactId>
|
||||
</dependency>
|
||||
<!--sentinel 依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.volvo.ai.analytic.center.feign;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.retry.annotation.Backoff;
|
||||
import org.springframework.retry.annotation.Retryable;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@@ -16,6 +18,12 @@ public interface DiFyFeign {
|
||||
, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
JSONObject runWorkflows(@RequestHeader(value = "Authorization") String authorization, @RequestBody Map<String, Object> map);
|
||||
|
||||
@Retryable(maxAttempts = 1, backoff = @Backoff(delay = 1000))
|
||||
@PostMapping(value = "v1/workflows/run"
|
||||
, consumes = MediaType.APPLICATION_JSON_VALUE
|
||||
, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
JSONObject runWorkflowsRetry(@RequestHeader(value = "Authorization") String authorization, @RequestBody Map<String, Object> map);
|
||||
|
||||
|
||||
|
||||
@PostMapping(value = "/v1/files/upload" , consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
|
||||
Reference in New Issue
Block a user