1、修改IDEA配置文件
IDEA安裝目錄,bin文件夾下 idea64.exe.vmoptions 和 idea.exe.vmoptions這兩個文件,分別添加:-Dfile.encoding=UTF-8。
2、修改IDEA設置
FileEncoding 中的 GlobalEncoding ProjectEncoding Default encoding for properties 都設置為UTF-8。
3、在部署服務器的VM options中添加:-Dfile.encoding=UTF-8
4、重啟IDEA(一定要重啟)