fix: 修复 ConcurrentModificationException

This commit is contained in:
xiongxiaoyang
2025-06-19 19:32:04 +08:00
parent 32541a7cb6
commit a9fc80eba1

View File

@ -5,8 +5,8 @@ import org.springframework.http.*;
import org.springframework.web.client.RestTemplate;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author Administrator
@ -16,7 +16,7 @@ public class HttpUtil {
private static final String DEFAULT_CHARSET = "utf-8";
private static final Map<String, RestTemplate> REST_TEMPLATE_MAP = new HashMap<>();
private static final Map<String, RestTemplate> REST_TEMPLATE_MAP = new ConcurrentHashMap<>();
public static String getByHttpClientWithChrome(String url, String charset) {
log.debug("Get url{}", url);