最近遇到在IDEA运行测试用例(junit4)时System.out.println中文时总是乱码,设置好编码后还是不行,后来总算解决了,这里记录下解决办法:

1.设置好编码:

IDEA运行junit测试用例时控制台中文输出乱码

 2.删除原来的 Run/Debug Configurations (这步很总要,就是很多时候就是因为没有做这边就会无效)

IDEA运行junit测试用例时控制台中文输出乱码

3.重新运行 junit

IDEA运行junit测试用例时控制台中文输出乱码

相关文章:

  • 2021-08-24
  • 2022-12-23
  • 2021-07-31
  • 2021-03-28
  • 2021-10-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-04
  • 2022-12-23
  • 2021-06-22
  • 2022-01-02
  • 2022-01-29
  • 2022-12-23
  • 2021-08-12
相关资源
相似解决方案