TOC

参考:https://blog.csdn.net/sinat_15437217/article/details/77878988

问题描述:

项目在idea上运行正常,但是打包运行之后,部分或全部接口出现乱码问题

解决方法:

  • 在cmd中加参数启动
# 添加  -Dfile.encoding=utf-8 
java -Dfile.encoding=utf-8 -jar XXX.jar
  • 在代码中强制转化
InputStreamReader isr = new InputStreamReader(new FileInputStream(f),"utf-8");

相关文章:

  • 2022-12-23
  • 2021-08-16
  • 2022-03-07
  • 2021-05-18
  • 2021-09-23
  • 2021-11-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2021-10-26
相关资源
相似解决方案