added support for dynamic spring context.