1、File->Settings->Editor->File Encodings
2、将项目中的.idea文件夹中的encodings.xml文件中的编码格式改为uft-8
3、File->Settings->Build,Execution,Deployment -> Compiler -> Java Compiler
设置 Additional command line parameters选项为 -encoding utf-8
设置 Additional command line parameters选项为 -encoding utf-8