org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/apche/commons/fileupload/FileUploadException
表面上看似是fileupload的问题,只需要添加
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2</version>
</dependency>
添加完会再报类型转换的错误
只需要把controller中参数
CommonsMultipartFile换成MultipartFile就可以了