GITZYY 1 nedēļu atpakaļ
vecāks
revīzija
9065c6b357

+ 1 - 0
egress-gateway-service-domain/src/main/java/com/hrsk/cloud/eg/domain/api/ApiChannel.java

@@ -91,6 +91,7 @@ public class ApiChannel {
             return BeetlHelper.render(httpApiResponseConfig,response);
         }else if(StringUtils.equals(integrationMode, EgressApiEndpointIntegrationModeEnum.CUSTOMIZE.getCode())){
             //todo 代码模式
+
             return null;
         }else{
             throw new BizException(EgressApiErrorCodeEnum.ILLEGAL_INTEGRATION_MODE.getCode(),EgressApiErrorCodeEnum.ILLEGAL_INTEGRATION_MODE.getMessage());

+ 2 - 2
egress-gateway-service-infrastructure/src/main/java/com/hrsk/cloud/eg/infrastructure/client/http/HttpClient.java

@@ -21,7 +21,7 @@ import java.util.Objects;
 @Component
 public class HttpClient {
     @Resource
-    private RestTemplate restTemplate;
+    private RetryRestTemplate restTemplate;
     /**
      * 数据交换
      * @param request 请求
@@ -30,7 +30,7 @@ public class HttpClient {
     public ResponseEntity<String> exchange(HttpApiRequest request){
         ResponseEntity<String> responseEntity = null;
         try {
-            return restTemplate.exchange(request.getUrl(),
+            return restTemplate.restTemplate().exchange(request.getUrl(),
                     Objects.requireNonNull(HttpMethod.resolve(request.getMethod())),
                     new HttpEntity<>(request.getPayload()),
                     String.class);