springmvc 多文件上传 MultipartFile 怎么获取前台传过来的参数
@RequestMapping(value = "/address", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> addressPOST() {
Map<String, Object> map = new HashMap<>();
ReceivedGoodsAddress receivedgoodsaddress=new ReceivedGoodsAddress();
List<ReceivedGoodsAddress> list = addressService.findReceivedGoodsAddress(receivedgoodsaddress);
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);
});
}
});