Update intializer for the reactive servlet adapter

Move the AbstractServletHttpHandlerAdapterInitializer together with
the other two base classes in spring-web-reactive. Since the
interface is in the web package, this avoids a package cycle.
Also add a mention in the reference.

Issue: SPR-14713
This commit is contained in:
Rossen Stoyanchev
2016-09-16 12:54:22 -04:00
parent 2b57a4d618
commit cf2112f539
5 changed files with 18 additions and 31 deletions

View File

@@ -198,7 +198,7 @@ An `HttpHandler` can then be installed in each supported runtime:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
// Tomcat and Jetty
// Tomcat and Jetty (also see notes below)
HttpServlet servlet = new ServletHttpHandlerAdapter(httpHandler);
...
@@ -218,6 +218,16 @@ Undertow server = Undertow.builder().addHttpListener(port, host).setHandler(http
server.start();
----
[NOTE]
====
For Servlet runtimes you can use the `AbstractAnnotationConfigDispatcherHandlerInitializer`,
which as a `WebApplicationInitializer` is auto-detected by Servlet containers
and it registers for you the `ServletHttpHandlerAdapter` shown above.
Only implement one method to point to your Spring Java configuration classes.
====
[[web-reactive-getting-started-M1]]
=== Extent of Support in 5.0 M1