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

This code example shows how to use the following methods:setPrefix, setSuffix
		assertFalse(this.registry.hasRegistrations());
	} 
 
	@Test
	public void customViewResolver() { 
		InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
		viewResolver.setPrefix("/");
		viewResolver.setSuffix(".jsp");
		this.registry.viewResolver(viewResolver);
		assertSame(viewResolver, this.registry.getViewResolvers().get(0));
	} 
 
	@Test
	public void beanName() { 
		this.registry.beanName();
		assertEquals(1, this.registry.getViewResolvers().size());
		assertEquals(BeanNameViewResolver.class, registry.getViewResolvers().get(0).getClass());
	} 
 
	@Test
7
CodeRank
This code example shows how to use the following methods:setContentType, setPrefix, setSuffix, setViewClass
        }) 
public class SpringMvcConfiguration { 
 
    @Bean 
    public ViewResolver createInternalResourceViewResolver() {
        InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
        viewResolver.setViewClass(JstlView.class);
        viewResolver.setContentType("text/html");
        viewResolver.setPrefix("/WEB-INF/jsp/");
        viewResolver.setSuffix(".jsp");
 
        return viewResolver;
    } 
 
    @Bean 
    public DefaultServletHttpRequestHandler createDefaultServletHttpRequestHandler() {
        return new DefaultServletHttpRequestHandler();
    } 
} 
7
CodeRank
This code example shows how to use the following methods:setPrefix, setSuffix
This code example shows how to use the following methods:setPrefix, setSuffix
  @Inject 
  private Environment env;
   
  @Bean 
  public ViewResolver viewResolver() {
    InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
    viewResolver.setPrefix("/WEB-INF/jsp/");
    viewResolver.setSuffix(".jsp");
    return viewResolver;
  } 
   
  @Bean 
  public ClientController clientController() { 
    return new ClientController(env);
  } 
 
  @Override 
  public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
    configurer.enable();
  } 
6
CodeRank
This code example shows how to use the following methods:setPrefix, setSuffix, setViewClass
This code example shows how to use the following methods:setExposeContextBeansAsAttributes, setPrefix, setSuffix
This code example shows how to use the following methods:setPrefix, setSuffix, setViewClass
public class ResourcesConfig extends WebMvcConfigurationSupport 
{ 
	@Bean 
	public ViewResolver viewResolver ( ) 
	{ 
		InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); 
		viewResolver.setViewClass(JstlView.class); 
		viewResolver.setPrefix("/WEB-INF/"); 
		viewResolver.setSuffix(".jspx"); 
		return viewResolver; 
	} 
 
	@Override 
	public HandlerMapping resourceHandlerMapping ( ) 
	{ 
		SimpleUrlHandlerMapping handlerMapping = (SimpleUrlHandlerMapping) super.resourceHandlerMapping(); 
		handlerMapping.setInterceptors(getInterceptors()); 
		return handlerMapping; 
	} 
 
7
CodeRank
This code example shows how to use the following methods:setPrefix, setSuffix
		registry.addViewController("/").setViewName("home"); 
	} 
 
	@Bean 
	public InternalResourceViewResolver viewResolver() { 
		InternalResourceViewResolver resolver = new InternalResourceViewResolver(); 
		resolver.setPrefix("/WEB-INF/views/"); 
		resolver.setSuffix(".jsp"); 
		return resolver; 
	}	 
 
} 
7
CodeRank
This code example shows how to use the following methods:setPrefix, setSuffix, setViewClass
        return new LibraryController(); 
    } 
 
    @Bean 
    public ViewResolver viewResolver() {
        InternalResourceViewResolver bean = new InternalResourceViewResolver();
        bean.setPrefix("/jsp/");
        bean.setSuffix(".jsp");
        bean.setViewClass(JstlView.class);
        return bean;
    } 
} 
7
CodeRank
This code example shows how to use the following methods:setPrefix, setSuffix, setViewClass
	} 
 
	 
	//@Bean(name="viewResolverJsp") 
	public InternalResourceViewResolver internalResourceViewResolverJsp() {
		InternalResourceViewResolver result = new InternalResourceViewResolver();
		result.setPrefix("/WEB-INF/jsp/");
		result.setSuffix(".jsp");
		result.setViewClass(JstlView.class);
//		result.setOrder(1); 
		return result;
	} 
 
	//@Bean(name="viewResolverHtml") 
	public InternalResourceViewResolver internalResourceViewResolverHtml() {
		InternalResourceViewResolver result = new InternalResourceViewResolverChainable();
		result.setPrefix("/resources/");
		result.setSuffix(".html");
//		result.setOrder(2); 
		return result;
6
CodeRank