IDEA中启动tomcat后控制台中文乱码的解决办法

遇到的问题—启动tomcat后控制台中文乱码

IDEA中启动tomcat后控制台中文乱码的解决办法(亲测有效)

解决办法:
第一步:找到 help 下的idea64.exe.vmoptions文件
IDEA中启动tomcat后控制台中文乱码的解决办法(亲测有效)

第二步:在文档中添加 -Dfile.encoding=UTF-8
IDEA中启动tomcat后控制台中文乱码的解决办法(亲测有效)

第三步:设置vm option参数为: -Dfile.encoding=UTF-8
IDEA中启动tomcat后控制台中文乱码的解决办法(亲测有效)
IDEA中启动tomcat后控制台中文乱码的解决办法(亲测有效)

结果:
IDEA中启动tomcat后控制台中文乱码的解决办法(亲测有效)

衍生:如果不是启动tomcat项目报错。可以重复前面的第一二步,然后添加后面步骤:

第四步:统一设置我们代码的编码格式

在 idea下 file -> setting -> editor -> file encodings -> global encoding 、project encoding、properties三个地方的编码设置为UTF-8

IDEA中启动tomcat后控制台中文乱码的解决办法(亲测有效)

相关文章:

  • 2021-04-14
  • 2021-10-12
  • 2021-11-06
  • 2021-09-19
  • 2021-10-28
  • 2021-11-15
  • 2021-06-21
猜你喜欢
  • 2022-12-23
  • 2021-08-01
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
相关资源
相似解决方案