IDEA tomcat容器和log4j日志中文乱码的终极解决方案
一、Tomcat容器下Conf文件夹 如果是GBK改为UTF-8 java.util.logging.ConsoleHandler.encoding = UTF-8 logging.properties <Connector port="8080" protocol="HTTP/1.1" connectionTimeout ="20000" redirectPort ="8443" URIEncoding="UTF-8"/> <!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" /> server.xml 二、网上很多说的改 IDEA安装目录bin下的idea.exe.vmoptions,idea64.exe.vmoptions两个文件,末尾加入 -Dfile.encoding=UTF-8 - Xms128m - Xmx750m -XX:ReservedCodeCacheSize= 240m -XX:+ UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 - ea -XX:CICompilerCount=2 -Dsun.io