RT,最好可以有代码,感谢
返回泛型不同,一个没有规定泛型为U,由completableFuture 包装为CompletableFuture<U> ,一个泛型是CompletableFuture<U>,完全由用户自己定义,说白了就是相当于开放了部分权限,thenComposeAsync 比 thenApplyAsync 更加灵活
completableFuture
CompletableFuture<U>
thenComposeAsync
thenApplyAsync
2.1m questions
2.1m answers
60 comments
56.8k users