默认服务端使用UTF=8编码
排查1:
请求前手动设置UTF-8编码解析报文
RestTemplate restTemplate = new RestTemplate();
restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(StandardCharsets.UTF_8));
ResponseEntity<String> exchange = restTemplate.postForEntity(url, reqEntity, String.class);
排查2:
请求头中Accept-Encoding值如下,导致返回报文被压缩,注释这行代码
header.set("Accept-Encoding","gzip, deflate, br, zstd");