test_class.declarator: mockMvc
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private MockMvc mockMvc;
test_class.type: MockMvc
test_class.var_name: mockMvc
test_class.file: lzpeng-boot-server/src/test/java/com/lzpeng/framework/web/controller/FileControllerTest.java
test_class.identifier: FileControllerTest
test_case.body: @Test
      void uploadFile() throws Exception {
          String result = mockMvc.perform(multipart("/framework/file")
                  .file(new MockMultipartFile(
                          "file", "test.txt",
                          MediaType.MULTIPART_FORM_DATA_VALUE, "Hello File".getBytes()))
                  .contentType(MediaType.MULTIPART_FORM_DATA))
                  .andExpect(status().isOk())
                  .andReturn().getResponse().getContentAsString();
          log.info(result);
      }
test_case.class_method_signature: FileControllerTest.uploadFile()
test_case.full_signature: @Test void uploadFile()
test_case.identifier: uploadFile
test_case.invocations: getContentAsString getResponse andReturn andExpect perform contentType file multipart getBytes isOk status info
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void uploadFile()
focal_class.declarator: fileInfoService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private FileInfoService fileInfoService;
focal_class.type: FileInfoService
focal_class.var_name: fileInfoService
focal_class.file: lzpeng-boot-server/src/main/java/com/lzpeng/framework/web/controller/FileController.java
focal_class.identifier: FileController
focal_class.class_method_signature: FileController.uploadFile(MultipartFile file)
focal_class.full_signature: @PostMapping @ApiOperation("上传文件") @PreAuthorize("isAuthenticated()") public Result<FileInfo> uploadFile(MultipartFile file)
focal_class.identifier: uploadFile
focal_class.modifiers: @PostMapping @ApiOperation("上传文件") @PreAuthorize("isAuthenticated()") public
focal_class.parameters: (MultipartFile file)
focal_class.return: Result<FileInfo>
focal_class.signature: Result<FileInfo> uploadFile(MultipartFile file)
focal_class.class_method_signature: FileController.downloadFile(@ApiParam(value = "文件id", required = true) @PathVariable String id, HttpServletResponse response) thr
focal_class.full_signature: @GetMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("下载文件") @PreAuthorize("isAuthenticated()") public void downloadFile(@ApiParam(value = "文件id", required = true) @PathVariable String id, HttpServletResponse response) thr
focal_class.identifier: downloadFile
focal_class.modifiers: @GetMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("下载文件") @PreAuthorize("isAuthenticated()") public
focal_class.parameters: (@ApiParam(value = "文件id", required = true) @PathVariable String id, HttpServletResponse response) thr
focal_class.return: void
focal_class.signature: void downloadFile(@ApiParam(value = "文件id", required = true) @PathVariable String id, HttpServletResponse response) thr
focal_class.class_method_signature: FileController.downloadLogFile(HttpServletResponse response)
focal_class.full_signature: @GetMapping("/log") @ApiOperation("下载服务器日志") @PreAuthorize("hasAnyRole('ADMIN')") public void downloadLogFile(HttpServletResponse response)
focal_class.identifier: downloadLogFile
focal_class.modifiers: @GetMapping("/log") @ApiOperation("下载服务器日志") @PreAuthorize("hasAnyRole('ADMIN')") public
focal_class.parameters: (HttpServletResponse response)
focal_class.return: void
focal_class.signature: void downloadLogFile(HttpServletResponse response)
focal_method.body: @PostMapping
      @ApiOperation("上传文件")
      @PreAuthorize("isAuthenticated()")
      public Result<FileInfo> uploadFile(MultipartFile file) throws IOException {
          FileInfo fileInfo = fileInfoService.uploadFile(file);
          return ResultUtil.success(fileInfo);
      }
focal_method.class_method_signature: FileController.uploadFile(MultipartFile file)
focal_method.full_signature: @PostMapping @ApiOperation("上传文件") @PreAuthorize("isAuthenticated()") public Result<FileInfo> uploadFile(MultipartFile file)
focal_method.identifier: uploadFile
focal_method.invocations: uploadFile success
focal_method.modifiers: @PostMapping @ApiOperation("上传文件") @PreAuthorize("isAuthenticated()") public
focal_method.parameters: (MultipartFile file)
focal_method.return: Result<FileInfo>
focal_method.signature: Result<FileInfo> uploadFile(MultipartFile file)