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

This code example shows how to use the following methods:enable
This code example shows how to use the following methods:enable
    return new ClientController(env);
  } 
 
  @Override 
  public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
    configurer.enable();
  } 
} 
6
CodeRank
This code example shows how to use the following methods:enable
@Configuration 
@EnableWebMvc 
public class WebConfiguration extends WebMvcConfigurerAdapter {
	@Override 
	public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
		configurer.enable();
	} 
 
//	@Override 
//	public void configureAsyncSupport(AsyncSupportConfigurer configurer) { 
//		configurer.setDefaultTimeout(10000); 
//	} 
} 
5
CodeRank
This code example shows how to use the following methods:enable
                .setCachePeriod(MAX_VALUE);
    } 
 
    @Override 
    public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
        configurer.enable();
    } 
 
    @Bean 
    public ViewResolver viewResolver() {
        JtwigViewResolver viewResolver = new JtwigViewResolver();
        viewResolver.setPrefix(VIEWS_LOCATION);
        viewResolver.setSuffix(TWIG_HTML_EXTENSION);
        viewResolver.setCached(false);
 
        return viewResolver;
    } 
    @Bean 
    public ItemRepositoryResolver xoaiItemRepositoryResolver() { 
        return new DSpaceItemRepositoryResolver(); 
5
CodeRank
This code example shows how to use the following methods:enable
	} 
 
	@Override 
	public void configureDefaultServletHandling ( DefaultServletHandlerConfigurer configurer ) 
	{ 
		configurer.enable(); 
	} 
 
	@Override 
	public void addResourceHandlers ( ResourceHandlerRegistry registry ) 
	{ 
		ResourceHandlerRegistration resourceHandlerRegistration = registry.addResourceHandler("/**"); 
		resourceHandlerRegistration.addResourceLocations("/"); 
		ResourceChainRegistration resourceChain = resourceHandlerRegistration.resourceChain(false); 
		VersionResourceResolver versionResolver = new VersionResourceResolver().addContentVersionStrategy("/**"); 
		resourceChain.addResolver(versionResolver); 
	} 
} 
5
CodeRank
This code example shows how to use the following methods:enable
		return viewResolver;
	} 
 
	@Override 
	public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
		configurer.enable();
	} 
 
	@Bean 
	public SparklrController sparklrController(@Qualifier("sparklrService") 
	SparklrService sparklrService) {
		SparklrController controller = new SparklrController();
		controller.setSparklrService(sparklrService);
		return controller;
	} 
 
	@Bean 
	public SparklrRedirectController sparklrRedirectController(@Qualifier("sparklrRedirectService") 
	SparklrService sparklrService) {
		SparklrRedirectController controller = new SparklrRedirectController();
5
CodeRank
This code example shows how to use the following methods:enable
@Configuration 
@EnableWebMvc 
public class WebConfig extends WebMvcConfigurerAdapter {
  @Override 
  public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
    configurer.enable();
  } 
 
  @Bean 
  public ViewResolver internalResourceViewResolver() {
    InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
    viewResolver.setPrefix("/WEB-INF/jsp/");
    viewResolver.setSuffix(".jsp");
    viewResolver.setExposeContextBeansAsAttributes(true);
    return viewResolver;
  } 
 
  @Override 
  public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
    converters.add(new ByteArrayHttpMessageConverter());
5
CodeRank
This code example shows how to use the following methods:enable
        registry.addResourceHandler("/static/**").addResourceLocations("/static/");
    } 
 
    @Override 
    public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
        configurer.enable();
    } 
 
    @Bean 
    public SimpleMappingExceptionResolver exceptionResolver() {
        SimpleMappingExceptionResolver exceptionResolver = new SimpleMappingExceptionResolver();
 
        Properties exceptionMappings = new Properties();
 
        exceptionMappings.put("net.petrikainulainen.spring.testmvc.todo.exception.TodoNotFoundException", "error/404");
        exceptionMappings.put("java.lang.Exception", "error/error");
        exceptionMappings.put("java.lang.RuntimeException", "error/error");
 
        exceptionResolver.setExceptionMappings(exceptionMappings);
 
5
CodeRank
This code example shows how to use the following methods:enable
	} 
 
	@Override 
	public void configureDefaultServletHandling( 
			DefaultServletHandlerConfigurer configurer) { 
		configurer.enable(); 
	} 
 
	@Override 
	public void addViewControllers(ViewControllerRegistry registry) { 
		registry.addViewController("/").setViewName("welcome"); 
		registry.addViewController("/home").setViewName("welcome"); 
		registry.addViewController("/denied").setViewName("denied"); 
	} 
 
	@Bean(name = "tilesConfigurer") 
	public TilesConfigurer getTilesConfigurer() { 
		TilesConfigurer configurer = new TilesConfigurer(); 
		String[] tilesDefFiles = { "/WEB-INF/tiles.xml", 
				"/WEB-INF/accounts/tiles.xml" }; 
4
CodeRank
This code example shows how to use the following methods:enable
	} 
 
	@Override 
	public void configureDefaultServletHandling( 
			DefaultServletHandlerConfigurer configurer) { 
		configurer.enable(); 
	} 
 
	@Override 
	public void addViewControllers(ViewControllerRegistry registry) { 
		registry.addViewController("/").setViewName("welcome"); 
		registry.addViewController("/home").setViewName("welcome"); 
		registry.addViewController("/denied").setViewName("denied"); 
	} 
 
 
	@Bean(name = "tilesConfigurer") 
	public TilesConfigurer getTilesConfigurer() { 
		TilesConfigurer configurer = new TilesConfigurer(); 
		String[] tilesDefFiles = { "/WEB-INF/tiles.xml", 
4
CodeRank
See Code Examples for Spring Framework DefaultServletHandlerConfigurer Methods: