package china;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.http.ResponseEntity;
import org.springframework.util.CollectionUtils;
import org.springframework.web.client.RestTemplate;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
public class ChinaRegionalTest {
public static void main(String[] args) throws Exception {
String url = "https://restapi.amap.com/v3/config/district?keywords=100000&subdistrict=3&key=<用户的key>";
RestTemplate restTemplate = new RestTemplate();
ResponseEntity forEntity = restTemplate.getForEntity(url, String.class);
String body = forEntity.getBody();
ObjectMapper objectMapper = new ObjectMapper();
Map value = objectMapper.readValue(body, new TypeReference