小编Ran*_*ala的帖子

How to Send Emojis using RestTemplate in Spring Boot?

My requirement is to send JSON data from service (A) to another service (B), in this case, I am sending emojis in JSON using Spring Boot RestTemplate. If I send a request from A to B, in the service B the message is displayed as a text with a question mark(?) instead of emoji.

Sending this JSON data

{
"from": "1233222225",
"to":  "8585855858",
"message": "Hello A, hope you are doing 23012020 "
}
Run Code Online (Sandbox Code Playgroud)

displays in service B as

{
"from": …
Run Code Online (Sandbox Code Playgroud)

java resttemplate spring-boot microservices spring-rest

0
推荐指数
1
解决办法
2323
查看次数