FileController { @GetMapping("/log") @ApiOperation("下载服务器日志") @PreAuthorize("hasAnyRole('ADMIN')") public void downloadLogFile(HttpServletResponse response) throws IOException { fileInfoService.downloadLogFile(response); }  @PostMapping @ApiOperation("上传文件") @PreAuthorize("isAuthenticated()") Result<FileInfo> uploadFile(MultipartFile file); @GetMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("下载文件") @PreAuthorize("isAuthenticated()") void downloadFile(@ApiParam(value = "文件id", required = true) @PathVariable String id, HttpServletResponse response) thr; @GetMapping("/log") @ApiOperation("下载服务器日志") @PreAuthorize("hasAnyRole('ADMIN')") void downloadLogFile(HttpServletResponse response);  }
@Test void downloadLogFile() { }