返回泛型不同,一个没有规定泛型为U,由completableFuture 包装为CompletableFuture<U> ,一个泛型是CompletableFuture<U>,完全由用户自己定义,说白了就是相当于开放了部分权限,thenComposeAsync 比 thenApplyAsync 更加灵活
返回泛型不同,一个没有规定泛型为U,由
completableFuture
包装为CompletableFuture<U>
,一个泛型是CompletableFuture<U>
,完全由用户自己定义,说白了就是相当于开放了部分权限,thenComposeAsync
比thenApplyAsync
更加灵活