-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Description
We've introduced a DispatcherServletPathProvider
in 2.x
to resolve the effective servlet path of the application. We've also recently updated it to support the case of an application with multiple DispatcherServlet
instances (#13603).
We're not using that information consistently: StaticResourceRequest
and Error pages registration rely on on the path in properties and their usage is unknown if there are several dispatcher servlets.
I don't really know if we need to bring back a concept of "main" DispatcherServlet
but it feels to me that it would be useful that one is flagged as the one where auto-configuration can apply. We could have a default getAdditionalServletPaths
that returns an empty set and that users could implement for their use cases.
The lifecycle of DispatcherServletPathProvider
is also a bit weird (see this getBean call).