IDEA、Tomcat 乱码解决方法

1、将IDEA 的配置全改为 UTF-8 编码

  • File → Settings(快捷键 Ctrl + Alt + S) → Eidtor → File Encodings 中圈出来的三个地方的编码格式都改为 UTF-8 。

    IDEA修改文件编码为UTF-8

  • IDEA配置文件 添加-Dfile.encoding=UTF-8

    idea64.exe.vmoptions添加文件编码为 UTF-8

2、修改Tomcat配置文件

  • Tomcat安装目录 → conf → logging.properties,全都改为 UTF-8 编码

    Tomcat配置文件位置
    Tomcat修改日志编码为 UTF-8

  • Tomcat VM options 添加 -Dfile.encoding=UTF-8
    Tomcat VM options


likeqc
ends