我的是windows系统,控制台打印乱码,一顿操作
解决方法:
修改windows的编码格式,windows默认的GBK,需要设置为UTF-8
1).控制面板-》时钟和区域-》区域
2)重启电脑
设置idea server编码。在菜单栏找到”run->editconfigration” 找到”server”选项卡 设置 vm option为 -Dfile.encoding=utf-8
HELP->Edit Custom VM OPtions中加 -Dfile.encoding=utf-8 重启idea
把Tomcat中 server.xml:在 标签中添加 URIEncoding=“UTF-8”
修改tomcat中logging.properties
java.util.logging.ConsoleHandler.encoding = utf-8