IntelliJ IDEA 统一设置编码为utf-8编码

场景一:
File->Settings->Editor->File Encodings

IDEA 设置默认编码格式utf-8

场景二:

File->Other Settings->Settings for New Project->Editor->File Encodings

IDEA 设置默认编码格式utf-8

场景三:

将项目中的.idea文件夹中的encodings.xml文件中的编码格式改为uft-8

场景四:

File->Settings->Build,Execution,Deployment -> Compiler -> Java Compiler

设置 Additional command line parameters选项为 -encoding utf-8

IDEA 设置默认编码格式utf-8

场景五:

1)打开Run/Debug Configuration,选择你的tomcat

2) 然后在  Server > VM options 设置为 -Dfile.encoding=UTF-8 ,重启tomcat

IDEA 设置默认编码格式utf-8

 

 

相关文章:

  • 2021-07-24
  • 2021-07-24
  • 2021-09-16
  • 2022-01-10
  • 2021-06-28
  • 2021-11-20
  • 2021-11-20
猜你喜欢
  • 2022-02-10
  • 2021-06-12
  • 2022-12-23
  • 2021-12-31
  • 2021-12-16
  • 2021-11-20
  • 2022-01-07
相关资源
相似解决方案