![]() ![]() ![]() Spring underlying implementation can be based on Java Executor framework or a simple Java thread or even it can be based on a third party. Springs task execution abstraction hides implementation differences between Java SE 1.4, Java SE 5 and Java EE environments. ("/login Is called thread id is : " + Thread.currentThread(). Task execution is referred as creating a new thread and perform some task in it. ![]() The sample code is as method = RequestMethod.GET) Once WebAsyncTask returns the data, it is called again and processed, asynchronously, to return the value to the requester. We can use WebAsyncTask to distribute this request to a new thread to execute, http-nio-8084-exec-1 to receive processing of other requests. In addition to some time-consuming business logic, our query interface can also be asynchronous.Ī request to the service is received by a thread using the web container, such as thread http-nio-8084-exec-1 In many cases, in order to improve the throughput, some operations need to be asynchronous. In Spring Boot (Spring MVC), requests are synchronous by default, and one thread is responsible for each request from the beginning to the end. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |