Tag Archives: :org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part ‘file_data’ is not present

[Solved] org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part ‘file_data’ is not present

Background Error:org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part ‘file_data’ is not present
Reason:The front and backend parameters do not match, the frontend does not have the parameter file_data
@RequestMapping(value = “/importDept”, method = RequestMethod.POST)
@ResponseBody
public AjaxResult importDept(@RequestParam(value = “file_data”) MultipartFile file,
HttpServletRequest request) throws ParseException {

…..
}