Request","exception":"org.springframework.http.converter.HttpMessageNotReadableException","message":"JSON parse error: Invalid UTF-8 middle byte 0x3f
I immediately started the local project and asked colleagues in the front end to connect my local project for relevant function prompts. The result was that everything was normal without any problem, and the response error messages returned by checking the front end were all 400.
The error screenshot is not saved. The format of the error response is as follows:
To be added.
We must be clear here: in response to the 400 error code, there are several reasons for the error:
Tomcat service transport encoding format not specified (UTF-8)
Tomcat server JAR file encoding format not specified (UTF-8)
The front-end request header parameter does not match the backend parse header parameter.
Step 1: Configure the Tomcat server to transfer the encoding format specified:
Edit the tomcat/conf/server.xml file and add encoding attributes to the Connector tag: uriEncoding =”UTF-8″
Setjava_opts =%JAVA_OPTS% -dfile.encoding =UTF-8; setjava_opts % -dfile.encoding =UTF-8
SpringMVC backend code specifies request header information:
Read More:
- JSON parse e rror: Invalid UTF-8 middle byte 0x3f;
- 【ipfs-api】npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
- Unable to read workspace file ‘D:\angular.json‘: Invalid JSON character: “ “ at
- When websocket transmits JSON text, the parse method reports an error
- Vs series console flashback solution
- Python’s json.loads Invalid control character
- INSTALL PARSE FAILED INCONSISTENT CERTIFICATES error solution
- Solution to parse error at “IID” reported by QT
- AVD prompt Error:Could not Parse error string solution
- [jQuery] jQuery operates on JSON strings or JSON objects
- Python json.dumps () json.dump The difference between ()
- PHP reports “parse error: syntax error, unexpected T”_ The solution of “variable”
- User defined profile in vscode settings.json And default configuration defaultSettings.json
- Error reading JSON file: json.decoder.JSONDecodeError : Extra data: line 6 column 2 (char 1329)
- Configuration file for vscode setting.json UI interface or JSON form
- The solution of “double quotation marks become escape characters” in Java parsing JSON
- The solution of comments are not permitted in JSON. (521) in vscode
- JSON data format net.sf.json .JSONException: A JSONObject text must begin with ‘{‘ at character 1 of Error:(f…
- Solution of invalid host header in vue-cli3
- About WLW (Windows Live Writer): “unable to connect to your log service: invalid server response” solution