Update information on WebApplicationContext hierarchy
Issue: SPR-16041
This commit is contained in:
@@ -346,8 +346,13 @@ server.addConnector(connector);
|
||||
server.start();
|
||||
----
|
||||
|
||||
You can also deploy as a WAR to any Servlet 3.1 container by wrapping the handler with
|
||||
`ServletHttpHandlerAdapter` as a `Servlet`.
|
||||
[NOTE]
|
||||
====
|
||||
To deploy as a WAR to a Servlet 3.1+ container, wrap `HttpHandler` with
|
||||
`ServletHttpHandlerAdapter` and register that as a `Servlet`. Use
|
||||
{api-spring-framework}/web/reactive/support/AbstractServletHttpHandlerAdapterInitializer.html[AbstractServletHttpHandlerAdapterInitializer]
|
||||
to automate the required Servlet container configuration.
|
||||
====
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -161,6 +161,12 @@ Below is example configuration with a `WebApplicationContext` hierarchy:
|
||||
}
|
||||
----
|
||||
|
||||
[TIP]
|
||||
====
|
||||
If an application context hierarchy is not required, applications may return all
|
||||
configuration via `getRootConfigClasses()` and `null` from `getServletConfigClasses()`.
|
||||
====
|
||||
|
||||
And the `web.xml` equivalent:
|
||||
|
||||
[source,xml,indent=0]
|
||||
@@ -195,6 +201,13 @@ And the `web.xml` equivalent:
|
||||
</web-app>
|
||||
----
|
||||
|
||||
[TIP]
|
||||
====
|
||||
If an application context hierarchy is not required, applications may configure a
|
||||
"root" context only and leave the `contextConfigLocation` Servlet parameter empty.
|
||||
====
|
||||
|
||||
|
||||
|
||||
|
||||
[[mvc-servlet-special-bean-types]]
|
||||
|
||||
Reference in New Issue
Block a user