POST http://localhost:8080/purchase/purchase-apply/update.htm 400 (Bad Request)
n.ajaxTransport.k.cors.a.crossDomain.send
n.extend.ajax
(anonymous function)
n.event.dispatch
n.event.add.r.handle
ajax异步提交,springmvc框架
在controller中加入:
@RequestMapping(value = ADD, method = RequestMethod.POST) @ResponseBody public Result add(@RequestBody YearContract yearContract) { purchaseLongTermContractAo.add(yearContract); return SUCCESS; }
在方法体上加入:
@ResponseBody即可解决
时间: 2024-11-02 10:18:06