CompletableFuture.supplyAsync(() -> { Thread.sleep(200); } ).orTimeout(1, TimeUnit.SECONDS);
CompletableFuture cf1 = demoServiceAsyncExecutor.async(service -> service.hello("123"));
CompletableFuture cf2 = demoServiceAsyncExecutor.async(service -> service.hello("456"));
WebClient cf3 = CompletableFuture.supplyAsync(() -> getDb(id), ThreadPoolConfig.ASYNC_TASK_EXECUTOR);
return CompletableFuture.allOf(cf1, cf2, cf3) .thenApply(r -> cf1.join() + cf2.join() + dbFuture.join()).join();