Details
-
Improvement
-
Resolution: Not an issue
-
Neutral
-
None
-
3.1.2
-
None
Description
Having module class bean properties (JCR) available as Property Source would be a nice improvement. My current implementation is using a ApplicationContextInitializer to achieve this.
https://documentation.magnolia-cms.com/display/DOCS/Module+configuration
public class MyContextInitializer implements ApplicationContextInitializer<AnnotationConfigWebApplicationContext> { @Override public void initialize(AnnotationConfigWebApplicationContext applicationContext) { // add module config to enviroment property sources MyMagnoliaModule module = Components.getComponent(MyMagnoliaModule.class); MyPropertySource myPropertySource = new MyPropertySource("myModuleConfig", module.getModuleConfiguration()); MutablePropertySources sources = applicationContext.getEnvironment().getPropertySources(); sources.addFirst(myPropertySource); } }
Problems to solve:
- Automatic context refresh after module configuration updates
- Better ApplicationContextInitializer Support for Blossom (
BLOSSOM-229)
Checklists
Acceptance criteria
Attachments
Issue Links
- relates to
-
BLOSSOM-229 Add ApplicationContextInitializer Support to BlossomModuleSupport
-
- Closed
-