Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. @RestController
  2. @RequestMapping(path = "/my-controller/v1", produces = APPLICATION_JSON_UTF8_VALUE)
  3. public class MyControllerV1 {
  4. @GetMapping(path = "/my-endpoint")
  5. @Timed("my.metric")
  6. public CompletableFuture<MyResponse> getSomething(
  7. HttpServletRequest httpRequest) {
  8.  
  9. return CompletableFuture.supplyAsync(() -> myLongRunningBusinessLogicWithSomeAsyncIO());
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement