/** * Import Spring bean definitions from either XML or Groovy sources into the * current bean builder instance. * @param resourcePattern the resource pattern */ public void importBeans(String resourcePattern) throws IOException { loadBeanDefinitions(resourcePattern); }
/** * Load bean definitions from the given Groovy scripts or XML files. * <p>Note that ".xml" files will be parsed as XML content; all other kinds * of resources will be parsed as Groovy scripts. * @param resources one or more resources to load from */ public void load(Resource... resources) { this.reader.loadBeanDefinitions(resources); }
/** * Load bean definitions from the given Groovy scripts or XML files. * <p>Note that ".xml" files will be parsed as XML content; all other kinds * of resources will be parsed as Groovy scripts. * @param resourceLocations one or more resource locations to load from */ public void load(String... resourceLocations) { this.reader.loadBeanDefinitions(resourceLocations); }
/** * Load bean definitions from the given Groovy scripts or XML files. * <p>Note that ".xml" files will be parsed as XML content; all other kinds * of resources will be parsed as Groovy scripts. * @param resources one or more resources to load from */ public void load(Resource... resources) { this.reader.loadBeanDefinitions(resources); }
/** * Load bean definitions from the given Groovy scripts or XML files. * <p>Note that ".xml" files will be parsed as XML content; all other kinds * of resources will be parsed as Groovy scripts. * @param resourceLocations one or more resource locations to load from */ public void load(String... resourceLocations) { this.reader.loadBeanDefinitions(resourceLocations); }
/** * Import Spring bean definitions from either XML or Groovy sources into the * current bean builder instance. * @param resourcePattern the resource pattern */ public void importBeans(String resourcePattern) throws IOException { loadBeanDefinitions(resourcePattern); }
/** * Load bean definitions from the specified Groovy script or XML file. * <p>Note that {@code ".xml"} files will be parsed as XML content; all other kinds * of resources will be parsed as Groovy scripts. * @param resource the resource descriptor for the Groovy script or XML file * @return the number of bean definitions found * @throws BeanDefinitionStoreException in case of loading or parsing errors */ public int loadBeanDefinitions(Resource resource) throws BeanDefinitionStoreException { return loadBeanDefinitions(new EncodedResource(resource)); }
/** * Load the bean definitions with the given GroovyBeanDefinitionReader. * <p>The lifecycle of the bean factory is handled by the refreshBeanFactory method; * therefore this method is just supposed to load and/or register bean definitions. * <p>Delegates to a ResourcePatternResolver for resolving location patterns * into Resource instances. * @throws IOException if the required Groovy script or XML file isn't found * @see #refreshBeanFactory * @see #getConfigLocations * @see #getResources * @see #getResourcePatternResolver */ protected void loadBeanDefinitions(GroovyBeanDefinitionReader reader) throws IOException { String[] configLocations = getConfigLocations(); if (configLocations != null) { for (String configLocation : configLocations) { reader.loadBeanDefinitions(configLocation); } } }
/** * Load bean definitions from the specified Groovy script or XML file. * <p>Note that {@code ".xml"} files will be parsed as XML content; all other kinds * of resources will be parsed as Groovy scripts. * @param resource the resource descriptor for the Groovy script or XML file * @return the number of bean definitions found * @throws BeanDefinitionStoreException in case of loading or parsing errors */ public int loadBeanDefinitions(Resource resource) throws BeanDefinitionStoreException { return loadBeanDefinitions(new EncodedResource(resource)); }
/** * Load bean definitions into the supplied {@link GenericApplicationContext context} * from the locations in the supplied {@code MergedContextConfiguration} using a * {@link GroovyBeanDefinitionReader}. * @param context the context into which the bean definitions should be loaded * @param mergedConfig the merged context configuration * @see org.springframework.test.context.support.AbstractGenericContextLoader#loadBeanDefinitions */ @Override protected void loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig) { new GroovyBeanDefinitionReader(context).loadBeanDefinitions(mergedConfig.getLocations()); }
/** * Load bean definitions into the supplied {@link GenericWebApplicationContext context} * from the locations in the supplied {@code WebMergedContextConfiguration} using a * {@link GroovyBeanDefinitionReader}. * @param context the context into which the bean definitions should be loaded * @param webMergedConfig the merged context configuration * @see AbstractGenericWebContextLoader#loadBeanDefinitions */ @Override protected void loadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig) { new GroovyBeanDefinitionReader(context).loadBeanDefinitions(webMergedConfig.getLocations()); }
/** * Load the bean definitions with the given GroovyBeanDefinitionReader. * <p>The lifecycle of the bean factory is handled by the refreshBeanFactory method; * therefore this method is just supposed to load and/or register bean definitions. * <p>Delegates to a ResourcePatternResolver for resolving location patterns * into Resource instances. * @throws IOException if the required Groovy script or XML file isn't found * @see #refreshBeanFactory * @see #getConfigLocations * @see #getResources * @see #getResourcePatternResolver */ protected void loadBeanDefinitions(GroovyBeanDefinitionReader reader) throws IOException { String[] configLocations = getConfigLocations(); if (configLocations != null) { for (String configLocation : configLocations) { reader.loadBeanDefinitions(configLocation); } } }
/** * Load bean definitions from the given Groovy scripts or XML files. * <p>Note that ".xml" files will be parsed as XML content; all other kinds * of resources will be parsed as Groovy scripts. * @param resourceLocations one or more resource locations to load from */ public void load(String... resourceLocations) { this.reader.loadBeanDefinitions(resourceLocations); }
/** * Load bean definitions from the given Groovy scripts or XML files. * <p>Note that ".xml" files will be parsed as XML content; all other kinds * of resources will be parsed as Groovy scripts. * @param resources one or more resources to load from */ public void load(Resource... resources) { this.reader.loadBeanDefinitions(resources); }
/** * Load bean definitions from the specified Groovy script or XML file. * <p>Note that {@code ".xml"} files will be parsed as XML content; all other kinds * of resources will be parsed as Groovy scripts. * @param resource the resource descriptor for the Groovy script or XML file * @return the number of bean definitions found * @throws BeanDefinitionStoreException in case of loading or parsing errors */ public int loadBeanDefinitions(Resource resource) throws BeanDefinitionStoreException { return loadBeanDefinitions(new EncodedResource(resource)); }
/** * Load the bean definitions with the given GroovyBeanDefinitionReader. * <p>The lifecycle of the bean factory is handled by the refreshBeanFactory method; * therefore this method is just supposed to load and/or register bean definitions. * <p>Delegates to a ResourcePatternResolver for resolving location patterns * into Resource instances. * @throws IOException if the required Groovy script or XML file isn't found * @see #refreshBeanFactory * @see #getConfigLocations * @see #getResources * @see #getResourcePatternResolver */ protected void loadBeanDefinitions(GroovyBeanDefinitionReader reader) throws IOException { String[] configLocations = getConfigLocations(); if (configLocations != null) { for (String configLocation : configLocations) { reader.loadBeanDefinitions(configLocation); } } }
/** * Load bean definitions into the supplied {@link GenericApplicationContext context} * from the locations in the supplied {@code MergedContextConfiguration} using a * {@link GroovyBeanDefinitionReader}. * @param context the context into which the bean definitions should be loaded * @param mergedConfig the merged context configuration * @see org.springframework.test.context.support.AbstractGenericContextLoader#loadBeanDefinitions */ @Override protected void loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig) { new GroovyBeanDefinitionReader(context).loadBeanDefinitions(mergedConfig.getLocations()); }
/** * Load bean definitions into the supplied {@link GenericApplicationContext context} * from the locations in the supplied {@code MergedContextConfiguration} using a * {@link GroovyBeanDefinitionReader}. * @param context the context into which the bean definitions should be loaded * @param mergedConfig the merged context configuration * @see org.springframework.test.context.support.AbstractGenericContextLoader#loadBeanDefinitions */ @Override protected void loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig) { new GroovyBeanDefinitionReader(context).loadBeanDefinitions(mergedConfig.getLocations()); }
/** * Load bean definitions into the supplied {@link GenericWebApplicationContext context} * from the locations in the supplied {@code WebMergedContextConfiguration} using a * {@link GroovyBeanDefinitionReader}. * @param context the context into which the bean definitions should be loaded * @param webMergedConfig the merged context configuration * @see AbstractGenericWebContextLoader#loadBeanDefinitions */ @Override protected void loadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig) { new GroovyBeanDefinitionReader(context).loadBeanDefinitions(webMergedConfig.getLocations()); }
/** * Load bean definitions into the supplied {@link GenericWebApplicationContext context} * from the locations in the supplied {@code WebMergedContextConfiguration} using a * {@link GroovyBeanDefinitionReader}. * @param context the context into which the bean definitions should be loaded * @param webMergedConfig the merged context configuration * @see AbstractGenericWebContextLoader#loadBeanDefinitions */ @Override protected void loadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig) { new GroovyBeanDefinitionReader(context).loadBeanDefinitions(webMergedConfig.getLocations()); }