今天碰到这个问题,找了一遍,解决办法如下步骤:
1.添加依赖:
< dependency>
< groupId>commons-io< /groupId>
< artifactId>commons-io< /artifactId>
< version>1.3.2< /version>
< /dependency>
< dependency>
< groupId>commons-fileupload< /groupId>
< artifactId>commons-fileupload< /artifactId>
< version>1.2.1< /version>
< /dependency>
2.控制器直接映射文件:如
@RequestParam(“excelFile”) MultipartFile excelFile
解决。
注:技术交流QQ群-595892258

博客分享了一个问题的解决办法。首先要添加 commons-io 和 commons-fileupload 的依赖,版本分别为 1.3.2 和 1.2.1。然后在控制器中直接映射文件,使用 @RequestParam(“excelFile”) MultipartFile excelFile 即可解决问题。
9400

被折叠的 条评论
为什么被折叠?



