IDEA中tomcat使用System.out.println乱码问题

IDEA中tomcat使用System.out.println乱码问题

tomcat9日志中文打印正常,但涉及到Java虚拟机的代码中文打印会乱码?
Windows默认编码为gbk,涉及到jvm编码tomcat也默认为Windows编码,
只需要配置一个地方就行了:
run—>edit configureurations----->vm options:-Dfile.encoding=UTF-8

-Dfile.encoding=UTF-8

在这里插入图片描述
原创作者:C-A-L-D
原创链接:https://blog.csdn.net/qq_42952262/article/details/96192700

猜你喜欢

转载自blog.csdn.net/weixin_43482906/article/details/113173856