.addBeanFactoryPostProcessor(postProcessor);
}
}
public void reconfigure(GrailsApplicationContext current, ServletContext servletContext, boolean loadExternalBeans) {
RuntimeSpringConfiguration springConfig = parent != null ? new DefaultRuntimeSpringConfiguration(parent) : new DefaultRuntimeSpringConfiguration();
Assert.state(pluginManager.isInitialised(),
"Cannot re-configure Grails application when it hasn't even been configured yet!");
pluginManager.doRuntimeConfiguration(springConfig);
List<String> beanNames = springConfig.getBeanNames();
for (Object beanName : beanNames) {
String name = (String) beanName;
if (LOG.isDebugEnabled()) {
LOG.debug("Re-creating bean definition [" + name + "]");
}
current.registerBeanDefinition(name, springConfig.createBeanDefinition(name));
// force initialisation
current.getBean(name);
}
pluginManager.doDynamicMethods();
pluginManager.doPostProcessing(current);