解决idea,tomcat服务器控制台输出中文乱码问题,无需更改任何文件内容

1.将如下页面中的编码全部改为UTF-8

路径:File | Settings | Editor | File Encodings

 2.将这个位置的编码也改为UTF-8

路径:File | Settings | Editor | General | Console

3.配置Tomcat服务器,将红框内容填写到对应位置 

 输入:-Dfile.encoding=UTF-8

4.重启Tomcat服务器,就会输出如下界面

中文显示就正常了!

猜你喜欢

转载自blog.csdn.net/weixin_51942352/article/details/127718876