from_data参数放在body里 调用接口
postman里调用的参数
MultiValueMap<String, String> body= new LinkedMultiValueMap<>(); body.add("xm",xm); body.add("zjhm",zjhm); body.add("reqid","1"); // String bodyJsonData = JSON.toJSONString(body); HttpEntity<MultiValueMap<String, String>> requestParams = new HttpEntity<>(body, headers); ResponseEntity<String> response = restTemplate.postForEntity(serverURL,requestParams,String.class); String result =response.getBody(); System.out.println("result----"+result); JSONObject str=JSONObject.parseObject(result); String resultCode = str.getString("code");