AJAX
var params = {
Map1: {
Object2: $("#field2").val(),
},
Map2: {
Object1: $("#field1").val(),
}
};
$.ajax({
url:'url'
dataType: 'json',
contentType: "application/json; charset=utf-8",
type: "post",
data: JSON.stringify(params),// convert params into an JSON object
success:function(data){
try{
//anything you want
}catch(e){
}
}
});
Controller
{code}
@RequestMapping(value = "/test")
@ResponseBody
public Object test(
@RequestBody Map<String, Object> map, HttpServletRequest request) {
}
{code}