相信大家使用spring 时一般都会用ajax发送delete请求,但是delete请求无法传参数怎么办呢?请看下面链接
http://stackoverflow.com/questions/10766195/spring-3-jquery-ajax-delete
javascript:
$.ajax({ url: 'additions/cancelUpload',type: 'POST',data: {filename : ui.draggable.get(0).file.name,_method: 'DELETE'},success: function (res) { alert(res); } });
Controller:
@RequestMapping(value = "cancelUpload",produces="text/html" method = RequestMethod.DELETE)