@RequestParam
deleteFile: function(filePath) {
return ajax({
method: 'POST',
url: '/cm/soft/package/package/deleteFile',
data: {
fileDir: filePath
}
});
},
public BaseResultVO deleteFile(@RequestParam("fileDir") String fileDir) {}
@PathVariable
savePackage: function(obj, packageId) {
var url = "/cm/soft/package/package/" + packageId;
return ajax({
method: 'POST',
url: url,
data: obj,
});
}
public BaseResultVO delete(@PathVariable String packageid) {}
报错:required string parameter XXX is not present
- jquery提交delete时,不支持@RequestParam,只支持@PathVariable形式
- 若api在调用的时候,如果存在重类型,但不重名;例如:/id与/name,两者在类型上是一样的