Search in sources :

Example 1 with RuntimeSpringConfiguration

use of org.grails.spring.RuntimeSpringConfiguration in project grails-core by grails.

the class DefaultGrailsPluginManager method reloadPlugin.

public void reloadPlugin(GrailsPlugin plugin) {
    plugin.doArtefactConfiguration();
    RuntimeSpringConfiguration springConfig = new DefaultRuntimeSpringConfiguration(parentCtx);
    doRuntimeConfiguration(plugin.getName(), springConfig);
    springConfig.registerBeansWithContext((GenericApplicationContext) applicationContext);
    plugin.doWithApplicationContext(applicationContext);
    plugin.doWithDynamicMethods(applicationContext);
}
Also used : DefaultRuntimeSpringConfiguration(org.grails.spring.DefaultRuntimeSpringConfiguration) RuntimeSpringConfiguration(org.grails.spring.RuntimeSpringConfiguration) DefaultRuntimeSpringConfiguration(org.grails.spring.DefaultRuntimeSpringConfiguration)

Example 2 with RuntimeSpringConfiguration

use of org.grails.spring.RuntimeSpringConfiguration in project grails-core by grails.

the class DefaultGrailsPluginTests method testDoWithRuntimeConfiguration.

public void testDoWithRuntimeConfiguration() {
    GrailsPlugin versionPlugin = new DefaultGrailsPlugin(versioned, ga);
    RuntimeSpringConfiguration springConfig = new DefaultRuntimeSpringConfiguration();
    versionPlugin.doWithRuntimeConfiguration(springConfig);
    ApplicationContext ctx = springConfig.getApplicationContext();
    assertTrue(ctx.containsBean("classEditor"));
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) GrailsPlugin(grails.plugins.GrailsPlugin) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin) DefaultRuntimeSpringConfiguration(org.grails.spring.DefaultRuntimeSpringConfiguration) RuntimeSpringConfiguration(org.grails.spring.RuntimeSpringConfiguration) DefaultRuntimeSpringConfiguration(org.grails.spring.DefaultRuntimeSpringConfiguration) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin)

Example 3 with RuntimeSpringConfiguration

use of org.grails.spring.RuntimeSpringConfiguration in project grails-core by grails.

the class DefaultGrailsPluginTests method testDoWithApplicationContext.

public void testDoWithApplicationContext() {
    GrailsPlugin versionPlugin = new DefaultGrailsPlugin(versioned, ga);
    RuntimeSpringConfiguration springConfig = new DefaultRuntimeSpringConfiguration();
    versionPlugin.doWithRuntimeConfiguration(springConfig);
    ApplicationContext ctx = springConfig.getApplicationContext();
    assertTrue(ctx.containsBean("classEditor"));
    versionPlugin.doWithApplicationContext(ctx);
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) GrailsPlugin(grails.plugins.GrailsPlugin) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin) DefaultRuntimeSpringConfiguration(org.grails.spring.DefaultRuntimeSpringConfiguration) RuntimeSpringConfiguration(org.grails.spring.RuntimeSpringConfiguration) DefaultRuntimeSpringConfiguration(org.grails.spring.DefaultRuntimeSpringConfiguration) DefaultGrailsPlugin(org.grails.plugins.DefaultGrailsPlugin)

Aggregations

DefaultRuntimeSpringConfiguration (org.grails.spring.DefaultRuntimeSpringConfiguration)3 RuntimeSpringConfiguration (org.grails.spring.RuntimeSpringConfiguration)3 GrailsPlugin (grails.plugins.GrailsPlugin)2 DefaultGrailsPlugin (org.grails.plugins.DefaultGrailsPlugin)2 ApplicationContext (org.springframework.context.ApplicationContext)2