Spring / Rest @RequestBody character encoding

I am using Tomcat 7 environment and I have deployed my spring / rest application.I have a method which is a post method that accepts json via @RequestBody

where some keys in json are in Arabic text. When I submit a request to the above post method and while parsing the jsonobject I am getting question marks instead arabic text

.

+3


source to share


1 answer


You need to accept utf-8 encoding . if you are using POSTMAN to test your API, you can see what your application accepts as Accept-Encoding .enter image description here



If it is not UTF-8 then you need to enable it in your application.

+3


source







All Articles