乱码样式:

2020-07-02T10:44:44.png
 

解决方案:

如下图设置tomcat

  1. 代码:-Dfile.encoding=UTF-8

2020-07-02T10:44:56.png

 2020-07-02T10:45:10.png

  1. 进入设置界面:

set--->editor--->file encoding(全部设置为UTF-8)

2020-07-02T10:45:17.png

 

*(最重要)3. 进入idea的安装文件中,bin文件下,修改idea.exe.vmoptions和idea64.exe.vmoptions

分别加入如下两句代码:

-Dfile.encoding=UTF-8
-Dconsole.encoding=UTF-8

 

结果:

2020-07-02T10:45:28.png

天晴了,雨停了,你又觉得你行了!

 

后补(2020年1月15日):

以上操作都不行,不是你的问题,是tomcat的编码问题!

打开tomcat的配置文件,conf/logging.properties,进行如下修改

2020-07-02T10:45:34.png

 

好的,就是这样!

最后修改:2020 年 07 月 02 日
如果觉得我的文章对你有用,请随意赞赏