上传多个图片发生异常:
如:控制器代码:
public String upload2(Model model,MultipartFile[] imageFile,
HttpServletRequest request) throws Exception { }
原因: MultipartFile[] imageFile 这里出现问题,找不到默认的构造方法
解决: @RequestParam("imageFile") //接受图片参数
public String upload2(Model model, @RequestParam("imageFile") MultipartFile[] imageFile,
HttpServletRequest request) throws Exception {
}