声明:本人非原创
在运行/调试 配置对话框的Startup/Connection面板中,
勾选Pass environment variables.
并添加一个environment variable,
Name填 JAVA_TOOL_OPTIONS, Value填 -Dfile.encoding=UTF-8.
点击确定。重启TOMCAT进行调试,可以看到控制台中tomcat日志中的中文能正常显示了。
上面基本上应该不会出现乱码啦