今天要用到突然忘了怎么写的了,找了好久才找到,现在记下以备用
//获取评论总数
@RequestMapping("/getAllRowCount")
public void getAllRowCount(Map<String, Object> model,int objectid, int type,HttpServletResponse response) throws IOException {
model.put("pageCount", commentBiz.getAllRowCount(objectid, type));
String json = JSONArray.fromObject(commentBiz.getAllRowCount(objectid, type)).toString();
response.getWriter().print(json);
}