From 7a81753b3d831f18ffb1593557a379f1aac48fc1 Mon Sep 17 00:00:00 2001 From: zjt <2749587898@qq.com> Date: Fri, 13 Sep 2024 23:32:49 +0800 Subject: [PATCH] 3 --- src/main/java/com/zjt/spring/springboot1/LoginController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/zjt/spring/springboot1/LoginController.java b/src/main/java/com/zjt/spring/springboot1/LoginController.java index 3d9d947..da15a33 100644 --- a/src/main/java/com/zjt/spring/springboot1/LoginController.java +++ b/src/main/java/com/zjt/spring/springboot1/LoginController.java @@ -16,7 +16,7 @@ public class LoginController { public String uploadcommit(MultipartFile file) { //保存文件 File file1 = new File("D:/javaee/untitled/data"); - //随机数不重复 永远 + //随机数不重复永远 String filename = UUID.randomUUID().toString() +file.getOriginalFilename(); try { file.transferTo(new File(file1, filename));