日期:2014-05-16 浏览次数:20357 次
@RequestMapping("/modifyconfiginput")
public @ResponseBody String modifyinput(
@RequestParam(value="id") String id,
@RequestParam(value="timestamp") String timestamp,
HttpServletResponse response
) throws Exception {
ImmediateConfig ic = this.immediatePictureService.findImmediateConfig(id);
String json = "["+"{name:'"+ic.getName()+"',classId:'"+ic.getProductClass().getClassId()+"',pyFile:'"+ic.getPyFile()+"'}]";
System.out.println("json:"+json);
//return json;
// 设置response的ContentType解决中文乱码
response.setContentType("text/html;charset=UTF-8");
response.getWriter().print(json);
return null;
}