springboot external tomcat often encounter problems Chinese garbled startup, usually due to the following four reasons:
IDEA does not set the character encoding:
File->settings->Editor->file encoding
The character encoding are amended as UTF-8.
IDEA profile right for the character encoding configuration:
Installation directory bin files in the folder found under IDEA
idea64.exe.vmoptions
(32 choicesidea.exe.vmoptions
) file,Edit this file,
-Dfile.encoding=UTF-8
insert: .
Tomcat configuration file character encoding scheme does not:
Mode 1:
Found under the Tomcat installation directory catalina.bat file, add set in the configuration "JAVA_OPTS =% JAVA_OPTS%% JSSE_OPTS% -Dfile.encoding = UTF-8" or startup configuration added in the IDEA tomcat -Dfile.encoding
Mode 2 (recommended):
- Open tomcat / conf / logging.properties
- 找到java.util.logging.ConsoleHandler.encoding = UTF-8
- Modify java.util.logging.ConsoleHandler.encoding = GBK
Windows command prompt, the system configuration does not match the character encoding:
Solution:
win+R
Enter regedit to open the registry editorHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
, the right mouse button - New, select the "string value", named "autorun", numerical data "65001" Click OK.
Reference Links: https://blog.csdn.net/jiahongfei1213895/article/details/86555672