一、打开Intellij的根目录,找到下图的两个文件(根据你的系统是32位或64位选择其中一个配置文件),在配置文件中添加:-Dfile.encoding=UTF-8
二、 配置IDE编码
点击File菜单-->Settings... 输入File Encodings
三、配置项目启动服务器参数
在配置Tomcat 中的 VM options 项中添加:-Dfile.encoding=UTF-8
转载于:https://www.cnblogs.com/lxh1197412986/p/7682757.html