How do you create asynchronous REST service in Java?
To enable async configuration in spring, follow these steps:- Create async thread pool. AsyncConfiguration.java. @Configuration.
- @Async controller methods. Methods which shall run asynchronously, annotate them with @Async annotation and method return type should return.
- Combine async method results. Inside REST Controller.