@RequestMapping("doAdd") public ResultModel createRecord(@RequestBody String json){ ResultModel createRecord = recordService.insertRecord(json); return createRecord; }
前台数据传送方式:
var dates = { "userId":userId, "externalUserId":externalUserId, "pageIndex":pageIndex }; $.ajax({ type: 'post', url: '', data: JSON.stringify(dates), dataType:'json', contentType: 'application/json', success: function(data){}, error: function () {} })