Spring Boot Chinese returned to the interface or browser garbled parsed into a question mark how to do
This article introduces how to return spring Boot Chinese to the interface or browser garbled parsing into question marks, the content is very detailed, interested friends can refer to, hope to be helpful to you.
That's all I wrote with @ RequestMapping ():
@ RequestMapping (value = "/ xxx path", method = RequestMethod.POST)
If you encounter the problem of garbled code returned at noon, you can add an attribute.
@ RequestMapping (value = "/ xxx path", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
This is one solution and there are two more I can do without trying.
1. Add produces = {"application/json;charset=UTF-8"}
two。 Override the configureMessageConverters method
3.@bean HttpMessageConverter
About spring Boot Chinese return to the interface or browser garbled parsing into question marks how to share here, I hope the above content can be of some help to you, you can learn more knowledge. If you think the article is good, you can share it for more people to see.