From the course: Spring: Spring MVC

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Spring MVC async processing under the hood

Spring MVC async processing under the hood

From the course: Spring: Spring MVC

Start my 1-month free trial

Spring MVC async processing under the hood

- [Instructor] Now let us understand Async Processing at Work. Firstly, this capability forms a part of Serviet 3.2 specification and Spring MVC has integrated itself very well with it. As a part of this mechanism, what happens is that there are separate threads. One for request processing and the other for the heavy lifting inside the application. How do we enable this in our Spring MVC App? Well, it's very simple. There's a flag called Async Supported. If you set that to True, then you have this enable in your application. We have created a project of Spring MVC using Spring Boot so that's already done for us by default, it's already set to True. In addition to enabling this capability, you've to make sure that your controller classes return either of the following from their methods. A Callable<T> or a DeferredResult<T>. By far all the controllers that we have designed for Hplus Application, the methods there…

Contents