1.打开IDEA ,File->Settings 搜索 File Encodings ,编码统一UTF-8
2.File->Settings 搜索 Console ,控制台编码统一编码统一UTF-8
3.找到idea安装目录,在bin目录下找到idea64/idea.exe.vmoptions,记事本打开,在后面添加:
-Dfile.encoding=UTF-8
4.在tomcat中将conf下的server.xml 的我们所用的端口的配置添加:
URIEncoding=“UTF-8”
5.修改tomcat中conf下logging.properties
配置 (注意:有的注释掉的utf-8的配置,去掉注释):
6.删除掉.idea文件下encodings.xml里面不是utf-8的配置项
7.Tomcat配置项 VM options:
-Dfile.encoding=UTF-8
8. “Help→Etit Custom VM Option”进入自定义虚拟机选项页面。在 idea64.exe.vmoptions 文件尾加上:
-Dfile.encoding=UTF-8
9.【重要】清空idea缓存,重启!