//先把对象转化为Json
String data = JSON.toJSONString(QueryCorpParam.builder().pageIndex(0).pageSize(1).corpCode(param.getCreditCode()).build());

//拼接时,用URLEncoder.encode去转译一下
String param = "&sign=".concat(sign).concat("&data=").concat(URLEncoder.encode(data,"utf-8"));

//正常调用即可
ResponseEntity<JSONObject> responseEntity = restTemplate.postForEntity(LaborConstant.ENDPOINT, param, JSONObject.class);

 

GitHub 加速计划 / ar / Aria
5.52 K
861
下载
下载可以很简单
最近提交(Master分支:2 个月前 )
b0d3c6dd - 4 个月前
8fd9634d - 4 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐