Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Spring Boot Chinese returned to the interface or browser garbled parsed into a question mark how to do

Shulou Source: shulou.com Published: 2022-06-02 02:34:33 09月29日 Update

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.

Tags: Garbled how to do interface browser question mark Chinese browsing content more path help good interest guy partner attribute article way method knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Linux macOS NVidia Docker