第一步:修改tomcat中VM options: -Dfile.encoding=UTF-8
第二步:在File -Setting中設置如下圖所示 把IDE 和項目都設置成爲UTF-8
三、打開IntelliJ IDEA本地安裝目錄中bin文件夾下的idea.exe.vmoptions和idea64.exe.vmoptions這兩個文件。
分別在這兩個文件內容的末尾添加-Dfile.encoding=UTF-8
如果還是亂碼問題則:
IDEA 打開 HELP->Edit Custom VM OPtions中加 -Dfile.encoding=utf-8
重啓IntelliJ IDEA即可解決亂碼問題。