Springboot: the deployment of external Tomcat under windows, console Chinese garbled solve

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 encodingThe 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 choices idea.exe.vmoptions) file,

Edit this file, -Dfile.encoding=UTF-8insert: .

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):

  1. Open tomcat / conf / logging.properties
  2. 找到java.util.logging.ConsoleHandler.encoding = UTF-8
  3. Modify java.util.logging.ConsoleHandler.encoding = GBK

Windows command prompt, the system configuration does not match the character encoding:

Solution: win+REnter regedit to open the registry editor HKEY_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

Guess you like

Origin blog.csdn.net/fly910905/article/details/90518751