SpringMVC上传图片报400

上传图片报400错误

出现错误原因 MultipartFile[]必须写在所有参数之前
required =false值要为false

public String uploadParkingImg(
            HttpServletResponse resp,
            HttpServletRequest request,
            @RequestParam(value = "files", required =false)MultipartFile[]                  files,
            Integer parkingId) throws IOException {

你可能感兴趣的:(springMVC)