Closed
Description
If a legacy web application need to register objects with Servlet
framework before SpringBootServletInitializer.onStartup
, it can implement it's own WebApplicationInitializer
and provide the precedence through the Ordered
interface.
SpringServletContainerInitializer
sorts all discovered WebApplicationInitializers
through AnnotationAwareOrderComparator
class. In case if the WebApplicationInitializer
does not implement Ordered
interface or is not annotated with @Order
annotation, it is assigned LOWEST_PRECEDENCE
.
I think it is better to add Ordered
implementation to SpringBootServletInitializer
and assign default precedence to 0
.
This issue came as a work around after regression of #2070 failed