1.编码格式设置
request.setCharacterEncoding("GBK");
response.setContentType("text/html;charset=GBK");
2.数据转json
List<User> user=method.select(user)
//list转json,引入的jar包为fastjson
String str=JSOn.toJSONString(list);
1.编码格式设置
request.setCharacterEncoding("GBK");
response.setContentType("text/html;charset=GBK");
2.数据转json
List<User> user=method.select(user)
//list转json,引入的jar包为fastjson
String str=JSOn.toJSONString(list);