Skip to content

Instantly share code, notes, and snippets.

@jadhavj
Last active April 4, 2016 11:25
Show Gist options
  • Save jadhavj/d9e34659d0176de05c0f831797c8482d to your computer and use it in GitHub Desktop.
Save jadhavj/d9e34659d0176de05c0f831797c8482d to your computer and use it in GitHub Desktop.
public class Products extends Controller {
public CompletionStage<Result> uploadProducts() throws Exception {
return CompletableFuture.supplyAsync(() -> addProductsToCatalog())
.thenApply(i -> ok("Products uploaded: " + i));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment