Jul 11th, 2012, 01:39 PM
Reloading a spring profile
Is it possible to have Spring reload the beans from a particular profile?
The requirement is this: I have to provide a gui panel that allows users in the system to change security settings. When the settings change, I will modify the spring configuration to match. Then I want to reload only the beans that are associated with the security subsystem. It was suggested that I should look into Spring Profiles, but I can only see doing this if I'm able to reload the profile. I don't need to maintain separate configuration profiles for any other reason, but if it is possible to reload one without affecting the remaining application context, that would be great.
Is this doable, or do I need to a) reload the entire spring context (which is not ideal, since there are so many beans managed by it, or b) force a restart of the application?