The Spring MVC Java config and XML namespace allow configuring an AsyncTaskExecutor originally used for java.util.concurrent.Callable return values and by default a SimpleAsyncTaskExecutor is used with the recommendation to configure a task executor with a thread pool for use under load.
Now that the same executor is also used for blocking writes when streaming with Flux or Observable, we should warn more proactively about this in the logs.
To make sure we're talking about the same thing, this is only required when streaming to the response (e.g. Server-Sent Events, or application/stream+json) via Flux or io.reactivex.Observable where each event is written to the response via a blocking write to the ServletOutputStream. If you do that, on the first such response, a warnings appears in the logs, and plugging in a thread pool via WebMvcConfigurer#configureAsyncSupport is a solution, not a workaround.
This is not needed if you return a single value, such as Mono, or a Flux that's then collected to a Mono<List> which is the case for "application/json". In those cases a warning will not appear in the logs. So the warning can be used to check whether this is needed or not.
Yes we are talking about streaming case. I would like to say that usually Spring Boot configures automatically required infrastructure, so need to configure ThreadPoolTaskExecutor from scratch is not typical.
If autoconfiguration is not possible, sample in documentation with default settings and/or good practice would be useful.
As of today actually and available in the next milestone of Spring Boot 2.1, see #1563 for more details. There will be a TaskExecutorBuilder that you can use to easily build custom ThreadPoolTaskExecutor instances.
In the meantime, I am afraid you'll have to implement WebMvcConfigurer.