Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report