|
@@ -3,6 +3,7 @@ package io.github.pnoker.gateway.utils;
|
|
|
import org.springframework.remoting.RemoteAccessException;
|
|
|
import org.springframework.retry.annotation.Backoff;
|
|
|
import org.springframework.retry.annotation.Retryable;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.io.BufferedReader;
|
|
|
import java.io.InputStreamReader;
|
|
@@ -19,6 +20,7 @@ import java.util.Map;
|
|
|
* @Date 2024/9/3
|
|
|
* @Version V1.0
|
|
|
**/
|
|
|
+@Component
|
|
|
public class HttpUtil {
|
|
|
// GET 请求
|
|
|
@Retryable(value = {RemoteAccessException.class}, maxAttempts = 3, backoff = @Backoff(delay = 200L, multiplier = 1))
|