IDEA 及 Tomcat 编码设置
IDEA 及 Tomcat 编码设置
- 在 Tomcat 的 VM Options 设置中添加
-Dfile.encoding=UTF-8
- 在 IDEA 的
Help -> Edit Custom VM Options
中也添加-Dfile.encoding=UTF-8
,然后File -> Invalidate Caches...
清除缓存并重启 IDEA。
PS:File -> Setting
中的Editor -> File Encodings
中的设置也需要全都设置为UTF-8
。