Details
-
Improvement
-
Status: Open
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
None
Description
I think it's a good idea to be able to set the root Spring application context as the parent of the default context that HST creates and uses.
A use case for this is for example when using Spring security and you want to access say a UserManager bean in your HST components, which is a bean defined in the root context. It would be nice to have access to that and I think it's trivial:
- Add a conf property 'component.inherit.root.web.application.context' = true (false by default)
- Modify org.hippoecm.hst.site.container.SpringComponentManager#initialize to use the 3 argument constructor of DefaultComponentManagerApplicationContext (org.hippoecm.hst.site.container.DefaultComponentManagerApplicationContext(ComponentManager componentManager, ContainerConfiguration containerConfiguration, ApplicationContext parentApplicationContext)), allowing the WebApplicationContext be the parent of HST ComponentManager, if the option is set to true.
wdyt?
Attachments
Issue Links
- relates to
-
HSTTWO-3105 Add optional fallback to spring root WebApplicationContext in case the HST core component manager does not find the bean
-
- Closed
-
-
HSTTWO-4191 Postpone initializing the HST Component Manager until the RepositoryService is available
-
- Closed
-