试了网上的很多方法,比如修改 JVM 的启动参数、修改 IDEA bin安装目录的启动参数,修改IDEA的设置: Settings->Editor->File Encodings 的 Global Encoding、Project Encoding、Default encoding for properties files 都不管用。

最后终于找到了解决办法(点击访问原文): 在要执行单元测试的文件内 右键单击->File Encoding->UTF-8

IDEA 运行 junit 测试时控制台中文乱码

IDEA 运行 junit 测试时控制台中文乱码

相关文章:

  • 2021-10-23
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2021-09-22
  • 2021-05-19
猜你喜欢
  • 2021-12-18
  • 2021-10-24
  • 2021-11-09
  • 2022-01-06
  • 2021-09-11
  • 2021-05-14
相关资源
相似解决方案