I am working on a configuration issue with spring, related to using a component based architecture, and how spring loads it's configuration files.
The problem is that each component will add information to the spring context, but in order to load a new config from the assembly, you have to edit the web.config and add in the config resources for that component (or at the very least edit an existing resource file and import the component's config from the assembly). The web.config is "owned" by another group, and cannot be edited.
What I would like is the following:
(1) create a specific directory in the App_Config for my spring files
(2) add a filewatcher to that directory to reload the application if an XML file is added / removed from the folder (Sitecore does this already)
(3) If I deploy a component (call it xyz), I would deploy an xyz.spring.xml file to the folder, which would include a single import statement for the proper configs within the assembly such as : <import resource="assembly://PageTypes.Service/PageTypes.Service/PageTypes.xml"/> or if I needed a config for test / debug configuration <import resource="assembly://PageTypes.Service/PageTypes.Service/PageTypes.DEBUG.xml"/>
(4) Add some code to tell spring (I am guessing a specialized implementation of the WebApplicationContext), that loads all files within a folder and processes them as config resources. Where we currently have
<resource uri="~/App_Config/xyz.xml" />
I would like something like
<resourceFolder path="~/App_Config/Spring" />
Anyone know how to do this, or if something similar exists already I can view?
... I am also open to other suggestions that get me what I want ...