//Springmvc接口
@RequestMapping(value="/cameraStauts", method=RequestMethod.GET, produces = "text/html;charset=UTF-8")//解决jsonp中文乱码问题
public @ResponseBody String cameraStauts(String callback){
List<Camera> list = cameraService.findAllCamera();
String jsonString = JSONObject.toJSONString(list);
String str=callback+"("+jsonString+")";
return str;
}
//ajax请求调用
$.getJSON("http://192.168.168.197:8080/video/cameraStauts?callback=?",function(data){
});