Spring Framework AbstractDispatcherServletInitializer - 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 AbstractDispatcherServletInitializer class.

This code example shows how to use the following methods:
 
/** 
 * @author Dave Syer 
 *  
 */ 
public class ServletInitializer extends AbstractDispatcherServletInitializer { 
 
	@Override 
	protected WebApplicationContext createServletApplicationContext() { 
		AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext(); 
		context.scan(ClassUtils.getPackageName(getClass())); 
		return context; 
	} 
 
	@Override 
	protected String[] getServletMappings() { 
		return new String[] { "/" }; 
	} 
 
	@Override 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
/** 
 * @author Dave Syer 
 *  
 */ 
public class ServletInitializer extends AbstractDispatcherServletInitializer { 
 
	@Override 
	protected WebApplicationContext createServletApplicationContext() { 
		AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext(); 
		context.register(SecurityConfig.class, WebMvcConfig.class); 
		return context; 
	} 
 
	@Override 
	protected String[] getServletMappings() { 
		return new String[] { "/" }; 
	} 
 
	@Override 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 */ 
public class WebAppInitializer extends AbstractDispatcherServletInitializer { 
 
    private GraphDatabaseService database; 
 
    public WebAppInitializer(GraphDatabaseService database) { 
        this.database = database; 
    } 
 
    @Override 
    protected WebApplicationContext createServletApplicationContext() { 
        GenericApplicationContext parent = new GenericApplicationContext(); 
        parent.getBeanFactory().registerSingleton("database", database); 
 
        GraphAwareRuntime runtime = RuntimeRegistry.getRuntime(database); 
        if (runtime != null) { 
            runtime.waitUntilStarted(); 
            parent.getBeanFactory().registerSingleton("databaseWriter", runtime.getDatabaseWriter()); 
        } 
 
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:
import com.jiwhiz.config.MongoConfig; 
 
/** 
 * @author Yuan Ji 
 */ 
public class JiwhizApplicationInitializer extends AbstractDispatcherServletInitializer { 
    @Override 
    protected WebApplicationContext createRootApplicationContext() { 
        AnnotationConfigWebApplicationContext rootAppContext = new AnnotationConfigWebApplicationContext(); 
        //set active profile for cloud foundry 
        CloudEnvironment cloudEnvironment = new CloudEnvironment(); 
        if (cloudEnvironment.isCloudFoundry()) { 
            rootAppContext.getEnvironment().setActiveProfiles("cloud"); 
        } 
        rootAppContext.register( JiwhizAppConfig.class, MongoConfig.class, SecurityConfig.class, SocialConfig.class, 
                CloudConfig.class, LocalConfig.class); 
        return rootAppContext; 
    } 
 
    @Override 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Spring Framework AbstractDispatcherServletInitializer Methods: