索赔检核,retry机制

This commit is contained in:
lxu75
2025-05-20 16:09:01 +08:00
parent 714d736000
commit 9696c65f1e
5 changed files with 32 additions and 2 deletions

View File

@@ -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>

View File

@@ -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)