This article is a mirror article of machine translation, please click here to jump to the original article.

View: 16381|Reply: 0

[Source] spring boot solves background return json to No converter found for return...

[Copy link]
Posted on 4/1/2019 1:09:38 PM | | |
Problem description

  • spring Boot Chinese returns garbled characters to the browser and parses into question marks? fastJson jackJson
  • Spring Boot has added a configuration to solve the problem of returning JSON to the foreground Chinese garbled characters, and the return JSON data error: no convertter for return value of type
  • After commenting out the problem of solving Chinese garbled characters, the object json is returned normally


Solve the configuration of Chinese garbled characters

In addition to the above configuration, MappingJackson2HttpMessageConverter is added
Note: If responseBodyConverter and MappingJackson2HttpMessageConverter are configured separately to ensure that the former is not overwritten, otherwise it will return springboot and return json normally, but return Chinese garbled characters, or return Chinese is not messy, but return object or json exception.

Fix the full code for springboot van lake Chinese garbled characters and return json 500 errors







Previous:The importance of proxy IP for crawlers and how to set up a proxy in Python3
Next:Comparison of RPC services and HTTP services
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com