当使用RestTemplate进行http请求时,的确很方便,但是当需要进行post请求时遇到了坑 1 POST传递参数 :采用 LinkedMultiValueMap ,不能使用HashMap String url = 'http://posturl';MultiValueMap<String, String> map= new LinkedMultiValueMap<String, String>(); map.add("shopid","1"); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); ...