为什么用了@RequestParam,还是显示参数 Not Present
1、GET请求,一般用@RequestParam
@RequestMapping(value = "/file/delete", method = RequestMethod.GET)
public String fileUpload(@RequestParam("uuids") String[] uuids) {
return uuids[0];
}
2、 POST请求,一般用@RequestBody
@RequestMapping(value = "/file/picExcel", method = RequestMethod.POST)
public ExcelTabel PicfileUpload(@RequestBody exceldata filePaths) throws Exception {
String filePath = filePaths.getFilePath();//自动get到exceldata类中的filePath属性
}