`.
@@ -504,10 +503,9 @@ You can configure the following:
* Default timeout value for async requests, which if not set, depends
on the underlying Servlet container.
* `AsyncTaskExecutor` to use for blocking writes when streaming with
-xref:web/webmvc/mvc-ann-async.adoc#mvc-ann-async-reactive-types[Reactive Types] and for executing `Callable` instances returned from
-controller methods. We highly recommended configuring this property if you
-stream with reactive types or have controller methods that return `Callable`, since
-by default, it is a `SimpleAsyncTaskExecutor`.
+xref:web/webmvc/mvc-ann-async.adoc#mvc-ann-async-reactive-types[Reactive Types] and for
+executing `Callable` instances returned from controller methods.
+The one used by default is not suitable for production under load.
* `DeferredResultProcessingInterceptor` implementations and `CallableProcessingInterceptor` implementations.
Note that you can also set the default timeout value on a `DeferredResult`,
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java
index a43bcb31a54..221d2f8395f 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java
@@ -22,9 +22,7 @@ import java.util.List;
import java.util.concurrent.Callable;
import org.springframework.core.task.AsyncTaskExecutor;
-import org.springframework.core.task.SimpleAsyncTaskExecutor;
import org.springframework.lang.Nullable;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.web.context.request.async.CallableProcessingInterceptor;
import org.springframework.web.context.request.async.DeferredResult;
import org.springframework.web.context.request.async.DeferredResultProcessingInterceptor;
@@ -49,15 +47,15 @@ public class AsyncSupportConfigurer {
/**
- * The provided task executor is used to:
+ * The provided task executor is used for the following:
*
* - Handle {@link Callable} controller method return values.
*
- Perform blocking writes when streaming to the response
* through a reactive (e.g. Reactor, RxJava) controller method return value.
*
- * By default only a {@link SimpleAsyncTaskExecutor} is used. However when
- * using the above two use cases, it's recommended to configure an executor
- * backed by a thread pool such as {@link ThreadPoolTaskExecutor}.
+ *
If your application has controllers with such return types, please
+ * configure an {@link AsyncTaskExecutor} as the one used by default is not
+ * suitable for production under load.
* @param taskExecutor the task executor instance to use by default
*/
public AsyncSupportConfigurer setTaskExecutor(AsyncTaskExecutor taskExecutor) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
index 733dea43c44..9c1e29f3e0d 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
@@ -399,9 +399,9 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
* Set the default {@link AsyncTaskExecutor} to use when a controller method
* return a {@link Callable}. Controller methods can override this default on
* a per-request basis by returning an {@link WebAsyncTask}.
- *
By default a {@link SimpleAsyncTaskExecutor} instance is used.
- * It's recommended to change that default in production as the simple executor
- * does not re-use threads.
+ *
If your application has controllers with such return types, please
+ * configure an {@link AsyncTaskExecutor} as the one used by default is not
+ * suitable for production under load.
*/
public void setTaskExecutor(AsyncTaskExecutor taskExecutor) {
this.taskExecutor = taskExecutor;