链式异步编排,thenApply/thenCompose/exceptionally 实战。
CompletableFuture<String> future = CompletableFuture.supplyAsync(() -> { return fetchData(); }).thenApply(data -> { return process(data); }).exceptionally(ex -> { return "fallback"; });