i\'m currently have a look a springboot undertow and it\'s not really clear (for me) how to dispatch an incoming http request to a worker thread for blocking operation handling.
You don't need to do anything.
Spring Boot's default Undertow configuration uses Undertow's ServletInitialHandler in front of Spring MVC's DispatcherServlet
. This handler performs the exchange.isInIoThread() check and calls dispatch() if necessary.
If you place a breakpoint in your @Controller
, you'll see that it's called on a thread named XNIO-1 task-n
which is a worker thread (the IO threads are named XNIO-1 I/O-n
).