以前使用springboot1.0.2,上传文件没有问题。
后来使用springboot1.5.6,上传文件时,出现MultiPartFile获取不到文件的问题。
没料到升级springboot1.5.6会导致问题
修改application.yml文件
spring:
http:
multipart:
enabled: false
参考
https://stackoverflow.com/questions/42732725/spring-boot-multipart-upload-getting-null-file-object
springboot1.5.6 文件上传项目示例
https://gitee.com/jscode/springboot-uploadfile-demo