Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
When using ModularTilesInitializer, an ApplicationContext can be created by each TilesInitializer, which will then be registered into the ServletContext by the TilesContainer.
As a result, the registered ApplicationContext may vary depending on the classpath order, leading to unreliable results.
Indeed we should use a single ApplicationContext in an application; in any case, registering the ApplicationContext with the ServletContext should not be the responsibility of the TilesContainer.
As a workaround, use a singleton pattern to create the ApplicationContext in each TilesInitializer.