1.在tomcat-server.xml里面找到 <Connector 标签里面写入 URLEncoding="UTF-8"
2.String str = new String(你的乱码字符串.getBytes("ISO8859_1"), "GBK");
如果你的前端是utf-8编码:
String str = new String(你的乱码字符串.getBytes("ISO8859_1"), "utf-8");