var nameAndAgeInfos = [
{name : "sue", age : 11}
, {name : "dave", age : 12}
];
$.ajax({
url: "/search/person/by-name-age",
type : 'POST',
data: JSON.stringify(nameAndAgeInfos),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(data) {
// TODO...
}.bind(this),
error: function(xhr, status, err) {
// TODO...
}.bind(this),
complete: function() {
// TODO...
}.bind(this)
});
@RequestMapping(value = "/search/person/by-name-age", method = RequestMethod.POST)
@ResponseBody
public List<Person> getPeople(@RequestBody ArrayList<SearchCondition> condition) {
// TODO...
}
{name : "sue", age : 11}
, {name : "dave", age : 12}
];
$.ajax({
url: "/search/person/by-name-age",
type : 'POST',
data: JSON.stringify(nameAndAgeInfos),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(data) {
// TODO...
}.bind(this),
error: function(xhr, status, err) {
// TODO...
}.bind(this),
complete: function() {
// TODO...
}.bind(this)
});
@RequestMapping(value = "/search/person/by-name-age", method = RequestMethod.POST)
@ResponseBody
public List<Person> getPeople(@RequestBody ArrayList<SearchCondition> condition) {
// TODO...
}
댓글
댓글 쓰기