Spring boot 如何通过RestTemplate按原样发送特殊符号

Spring boot 如何通过RestTemplate按原样发送特殊符号,spring-boot,utf-8,ascii,resttemplate,http-message-converter,Spring Boot,Utf 8,Ascii,Resttemplate,Http Message Converter,我通过RestTemplate以字符串形式发送JSON对象。问题是StringHttpMessageConverter正在将我的特殊字符转换为ASCII值。我正在发送

我通过RestTemplate以字符串形式发送JSON对象。问题是StringHttpMessageConverter正在将我的特殊字符转换为ASCII值。我正在发送<&服务正在接收\u003c。有什么建议吗

请求:请求字符串

String requestString = "{\"message1\":\"this is dummy message with <>\", \"message2\":\"सैन्य ताकत दिखाई देगी <>\"}";
String requestString=“{\”message1\:\”这是带有\“,\”message2\“:\”的伪消息सैन्य ताकत दिखाई देगी \"}";
RestTemplate

HttpEntity<String> httpEntity = new HttpEntity<>(requestString, new HttpHeaders());
RestTemplate restTemplate = new RestTemplate();
restTemplate.getMessageConverters().add(0, new StringHttpMessageConverter(StandardCharsets.UTF_8));
out = restTemplate.exchange("http://localhost:8080/external", HttpMethod.POST, httpEntity, String.class);
HttpEntity-HttpEntity=new-HttpEntity(requestString,new-HttpHeaders());
RestTemplate RestTemplate=新RestTemplate();
添加(0,新的StringHttpMessageConverter(StandardCharsets.UTF_8));
out=restTemplate.exchange(“http://localhost:8080/external,HttpMethod.POST,httpEntity,String.class);

我尝试使用您的代码访问webhook.site生成的公共端点(该网页生成一个URL,可用于跟踪收到的所有HTTP流量)。您的requestString已完全接收,并带有正确的“