进入idea安装目录-bin,打开idea.exe.vmoptions和idea64.exe.vmoptions文件,在末尾另起一行添加

-Dfile.encoding=UTF-8

之后执行Servlet在控制台输出中文,还会出现乱码

则设置vm option参数为: -Dfile.encoding=utf-8

重启服务器