Current CommonsMultipartResolver contains attribute maxUploadSize, it invokes apache commons fileupload.setSizeMax() which limits the size of the whole request. It should provide another attribute which invokes apache commons fileupload.setFileSizeMax() which limits the size of a single file.
Note: Now even I create a customMultipartResolver which extends CommonsMultipartResolver, and then invoke this.getFileupload().setFileSizeMax(), it doesn' work.
#18229 CommonsMultipartResolver.setMaxUploadSizePerFile() does not work if encoding does not match the default encoding
#19204 CommonsMultipartResolver should explicitly convert FileSizeLimitExceededException next to SizeLimitExceededException