I\'m trying to implement an asynchronous controller using SprintBoot. I want to make REST request to a controller so that the controller returns immediately, while the work
I think you misunderstand the MVC async (and Servlet 3) features. If your controller method takes a long time to complete it will be called in a different thread than the one used to handle the incoming request, but it still has to return data to the client on the same HTTP connection, so it can time out from that point of view. To return immediately but do the processing in the background you don't need async MVC, you just need to do the expensive processing in a background thread (e.g. by calling an @Async
method in another @Bean
).