Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RestController
- @RequestMapping(path = "/my-controller/v1", produces = APPLICATION_JSON_UTF8_VALUE)
- public class MyControllerV1 {
- @GetMapping(path = "/my-endpoint")
- @Timed("my.metric")
- public CompletableFuture<MyResponse> getSomething(
- HttpServletRequest httpRequest) {
- return CompletableFuture.supplyAsync(() -> myLongRunningBusinessLogicWithSomeAsyncIO());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement