Spring Framework AbstractGenericContextLoader - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework AbstractGenericContextLoader class.

This code example shows how to use the following methods:isGenerateDefaultLocations, processContextConfiguration
	} 
 
	@Override 
	public void processContextConfiguration(ContextConfigurationAttributes configAttributes) {
		// Detect default XML configuration files: 
		super.processContextConfiguration(configAttributes);
 
		// Detect default configuration classes: 
		if (!configAttributes.hasClasses() && isGenerateDefaultLocations()) {
			configAttributes.setClasses(detectDefaultConfigurationClasses(configAttributes.getDeclaringClass()));
		} 
	} 
 
	@Override 
	protected void loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig) {
		// Order doesn't matter: <bean> always wins over @Bean. 
		new XmlBeanDefinitionReader(context).loadBeanDefinitions(mergedConfig.getLocations());
		new AnnotatedBeanDefinitionReader(context).register(mergedConfig.getClasses());
	} 
 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
/** 
 * <p>User: Zhang Kaitao 
 * <p>Date: 13-12-18 
 * <p>Version: 1.0 
 */ 
public class GenericGroovyContextLoader extends AbstractGenericContextLoader { 
 
    @Override 
    protected String getResourceSuffix() { 
        throw new UnsupportedOperationException( 
                "GenericGroovyContextLoader does not support the getResourceSuffix() method"); 
    } 
 
    @Override 
    protected BeanDefinitionReader createBeanDefinitionReader(GenericApplicationContext context) { 
        return new GroovyBeanDefinitionReader(context); 
    } 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:loadContext
	public String[] processLocations(Class<?> clazz, String... locations) {
		return defaultLocations;
	} 
 
	public ApplicationContext loadContext(String... locations) throws Exception {
		return loader.loadContext(locations);
	} 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java