springboot实现异步方法
@Async public Future<OneFileScanResultReq> apiServerScanAsync(ScanFile scanFile, ScanTask scanTask) { log.info("apiServer scanAsync ,task id is {}, path {}", scanTask.getId(), scanFile.getPath()); OneFileScanResultReq oneFileScanResultReq = apiServerScan(scanFile, scanTask); return new AsyncResult<OneFileScanResultReq>(oneFileScanResultReq); }