日期:2014-05-18 浏览次数:20798 次
@RequestMapping(value="/project/list",method = RequestMethod.GET)
public ResponseEntity<HttpEntity> listProject(){
List<Project> projects = projectService.listAllProjects();
return new ResponseEntity(projects, HttpStatus.OK);
}
@RequestMapping(value="/project/list",method = RequestMethod.GET)
public ResponseEntity<HttpEntity> listProject(Model model){
List<Project> projects = projectService.listAllProjects();
model.addAttribute("project", projects);
return new ResponseEntity(model, HttpStatus.OK);
}
function a(jsondata){
othis=this
$.each(jsondata,function(a,v){
//a 属性命,v值
if(typeof v =="object"){
othis(v)
}
}
}