优化:重构代码

This commit is contained in:
陈精华
2020-05-18 09:46:52 +08:00
committed by kl
parent f620c00785
commit 1edf4d83f1
12 changed files with 95 additions and 82 deletions

View File

@@ -59,7 +59,7 @@ public class FileController {
if (!outFile.exists()) {
outFile.mkdirs();
}
logger.info("上传文件:{}", outFile.getAbsolutePath());
logger.info("上传文件:{}", fileDir + demoPath + fileName);
try(InputStream in = file.getInputStream(); OutputStream out = new FileOutputStream(fileDir + demoPath + fileName)) {
StreamUtils.copy(in, out);
return new ObjectMapper().writeValueAsString(new ReturnResponse<String>(0, "SUCCESS", null));