SHARE
TWEET

Untitled

a guest Jun 25th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top