/** * Create a new GenericGroovyApplicationContext, loading bean definitions * from the given resource locations and automatically refreshing the context. * @param resourceLocations the resources to load from */ public GenericGroovyApplicationContext(String... resourceLocations) { load(resourceLocations); refresh(); }
/** * Create a new GenericGroovyApplicationContext, loading bean definitions * from the given resources and automatically refreshing the context. * @param resources the resources to load from */ public GenericGroovyApplicationContext(Resource... resources) { load(resources); refresh(); }
/** * Create a new GenericGroovyApplicationContext, loading bean definitions * from the given resource locations and automatically refreshing the context. * @param relativeClass class whose package will be used as a prefix when * loading each specified resource name * @param resourceNames relatively-qualified names of resources to load */ public GenericGroovyApplicationContext(Class<?> relativeClass, String... resourceNames) { load(relativeClass, resourceNames); refresh(); }
/** * Create a new GenericGroovyApplicationContext, loading bean definitions * from the given resource locations and automatically refreshing the context. * @param resourceLocations the resources to load from */ public GenericGroovyApplicationContext(String... resourceLocations) { load(resourceLocations); refresh(); }
/** * Create a new GenericGroovyApplicationContext, loading bean definitions * from the given resource locations and automatically refreshing the context. * @param relativeClass class whose package will be used as a prefix when * loading each specified resource name * @param resourceNames relatively-qualified names of resources to load */ public GenericGroovyApplicationContext(Class<?> relativeClass, String... resourceNames) { load(relativeClass, resourceNames); refresh(); }
/** * Create a new GenericGroovyApplicationContext, loading bean definitions * from the given resources and automatically refreshing the context. * @param resources the resources to load from */ public GenericGroovyApplicationContext(Resource... resources) { load(resources); refresh(); }
@Test public void testLoadingMultipleConfigFilesWithRelativeClass() { GenericGroovyApplicationContext ctx = new GenericGroovyApplicationContext(); ctx.load(GroovyApplicationContextTests.class, "applicationContext2.groovy", "applicationContext.groovy"); ctx.refresh(); Object framework = ctx.getBean("framework"); assertNotNull("could not find framework bean", framework); assertEquals("Grails", framework); Object company = ctx.getBean("company"); assertNotNull("could not find company bean", company); assertEquals("SpringSource", company); }
/** * Create a new GenericGroovyApplicationContext, loading bean definitions * from the given resource locations and automatically refreshing the context. * @param relativeClass class whose package will be used as a prefix when * loading each specified resource name * @param resourceNames relatively-qualified names of resources to load */ public GenericGroovyApplicationContext(Class<?> relativeClass, String... resourceNames) { load(relativeClass, resourceNames); refresh(); }
/** * Create a new GenericGroovyApplicationContext, loading bean definitions * from the given resources and automatically refreshing the context. * @param resources the resources to load from */ public GenericGroovyApplicationContext(Resource... resources) { load(resources); refresh(); }
/** * Create a new GenericGroovyApplicationContext, loading bean definitions * from the given resource locations and automatically refreshing the context. * @param resourceLocations the resources to load from */ public GenericGroovyApplicationContext(String... resourceLocations) { load(resourceLocations); refresh(); }