spring RestTemplate传多个参数,并结果转中文

 MultiValueMap<String, Object> postParameters = new LinkedMultiValueMap<String, Object>();
        postParameters.add("pageNum", pageNum);
        postParameters.add("pageSize", pageSize);
        HttpHeaders headers = new HttpHeaders();
        headers.add("Content-Type", "application/x-www-form-urlencoded");
        HttpEntity<MultiValueMap<String, Object>> params = new HttpEntity<MultiValueMap<String, Object>>(postParameters,headers);
        String url = "";
        String result = restTemplate.postForObject(url, params, String.class);
        result = new String(result.getBytes(StandardCharsets.ISO_8859_1),StandardCharsets.UTF_8);
原文地址:https://www.cnblogs.com/fly-book/p/13086512.html