唐tag пре 1 година
родитељ
комит
52c1b702e7

+ 4 - 1
src/main/java/com/zswl/dataservicestarter/controller/TestController.java

@@ -1,5 +1,6 @@
 package com.zswl.dataservicestarter.controller;
 
+import com.github.javaparser.quality.NotNull;
 import com.zswl.dataservicestarter.service.UserService;
 import com.zswl.dataservicestarter.utils.result.ResultContent;
 import lombok.Cleanup;
@@ -38,7 +39,9 @@ public class TestController {
   @RequestMapping(value = "uploadFileDelegate", method = RequestMethod.POST)
   @SneakyThrows
   public ResultContent uploadFileDelegate(
-      @RequestParam(value = "file") MultipartFile multipartFile, String path, String epId) {
+      @RequestParam(value = "file") @NotNull MultipartFile multipartFile,
+      String path,
+      String epId) {
     @Cleanup InputStream inputStream = multipartFile.getInputStream();
     return ResultContent.buildSuccess();
   }