zoukankan      html  css  js  c++  java
  • 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);
    
  • 相关阅读:
    php分页问题
    php中memcached的使用
    Linux安装Git
    day06
    day07
    day03
    day05
    day04
    列表的操作
    初识数据类型
  • 原文地址:https://www.cnblogs.com/fly-book/p/13086512.html
Copyright © 2011-2022 走看看