用@ResponseBody
@RequestMapping(value = "/address", method = RequestMethod.POST)
@ResponseBody
public Map
Map
ReceivedGoodsAddress receivedgoodsaddress=new ReceivedGoodsAddress();
List
map.clear();
map.put("list", list);
return map;
}
//前台用jquery+ajax
$.ajax({
type:'POST',
url:'${contextPath}/address',
dataType:'json',
success:function(data){
$.each(data.list,function(i,item){
alert(i);
alert(item.id);
alert(item.name);
});
}
});