Tomcat idea to solve the garbage problem in Chinese console output

Tomcat idea to solve the garbage problem in Chinese console output

Each time with a new idea and will encounter tomcat tomcat console Chinese garbage problem, so in this order.

Basically you need to modify the startup parameters of tomcat (if the idea itself unified coding are set to utf-8 a)

Open the bin directory under tomcat, find catalina.bat file

Find JAVA_OPTS parameter in which plus -Dfile.encoding = UTF-8 ( with the 7.0.82 version is set to UTF-8,8.0.20 version needs to be set to GBK, currently do not know why, may be encoded components changes )

Guess you like

Origin www.cnblogs.com/whymoney1000/p/11125715.html