是springboot在使用transferTo方法同时操作一个文件和多个文件上传的时候的错误 改成: 导入maven <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.5</version> </dependency> FileUtils.copyInputStreamToFile(headImg.getInputStream(),file);