Doc use of reactive types in Spring MVC controllers
Issue: SPR-15365
This commit is contained in:
@@ -56,6 +56,11 @@ public class AsyncSupportConfigurer {
|
||||
* highly recommended to change that default in production since the simple
|
||||
* executor does not re-use threads.
|
||||
*
|
||||
* <p>As of 5.0 this executor is also used when a controller returns a reactive
|
||||
* type that does streaming (e.g. "text/event-stream" or
|
||||
* "application/stream+json") for the blocking writes to the
|
||||
* {@link javax.servlet.ServletOutputStream}.
|
||||
*
|
||||
* @param taskExecutor the task executor instance to use by default
|
||||
*/
|
||||
public AsyncSupportConfigurer setTaskExecutor(AsyncTaskExecutor taskExecutor) {
|
||||
|
||||
@@ -231,9 +231,14 @@
|
||||
<xsd:attribute name="task-executor" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.core.task.AsyncTaskExecutor"><![CDATA[
|
||||
The bean name of a default AsyncTaskExecutor to use when a controller method returns a {@link Callable}.
|
||||
The bean name of a default AsyncTaskExecutor to use when a controller method returns a "Callable".
|
||||
Controller methods can override this default on a per-request basis by returning an AsyncTask.
|
||||
By default, a SimpleAsyncTaskExecutor is used which does not re-use threads and is not recommended for production.
|
||||
|
||||
As of 5.0 this executor is also used when a controller returns a reactive type that does streaming
|
||||
(e.g. "text/event-stream" or "application/stream+json") for the blocking writes to the
|
||||
"javax.servlet.ServletOutputStream".
|
||||
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
|
||||
Reference in New Issue
Block a user