Java Code Examples for org.springframework.web.servlet.view.InternalResourceViewResolver#setOrder()

The following examples show how to use org.springframework.web.servlet.view.InternalResourceViewResolver#setOrder() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ZkWebMvcConfiguration.java    From zkspringboot with Apache License 2.0 6 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	if(zkProperties.isZulViewResolverEnabled()) {
		final String springbootPackaging = zkProperties.getSpringbootPackaging();
		String prefix;
		if(zkProperties.isWar()) {
			prefix = zkProperties.getZulViewResolverPrefix() + "/";
		} else {
			prefix = zkProperties.getUpdateUri() + ClassWebResource.PATH_PREFIX + zkProperties.getZulViewResolverPrefix() + "/";
		}
		final String suffix = zkProperties.getZulViewResolverSuffix();
		logger.info("ZK-Springboot: InternalViewResolver enabled - e.g. resolving view 'example' to '{}example{}'", prefix, suffix);
		InternalResourceViewResolver resolver = new InternalResourceViewResolver(prefix, suffix);
		resolver.setOrder(InternalResourceViewResolver.LOWEST_PRECEDENCE);
		registry.viewResolver(resolver);
	}
}
 
Example 2
Source File: ApplicationConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver htmlViewResolver() {
    InternalResourceViewResolver bean = new InternalResourceViewResolver();
    bean.setPrefix("/WEB-INF/html/");
    bean.setSuffix(".html");
    bean.setOrder(2);
    return bean;
}
 
Example 3
Source File: WebConfig.java    From springBoot-study with Apache License 2.0 5 votes vote down vote up
@Bean
public ViewResolver viewResolver() {
    InternalResourceViewResolver resolver = new InternalResourceViewResolver();
    resolver.setPrefix("/WEB-INF/");
    resolver.setSuffix(".jsp");
    resolver.setViewNames("jsp/*");
    resolver.setOrder(2);
    return resolver;
}
 
Example 4
Source File: ApplicationConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver bean = new InternalResourceViewResolver();
    bean.setPrefix("/WEB-INF/views/");
    bean.setSuffix(".jsp");
    bean.setOrder(1);
    return bean;
}
 
Example 5
Source File: WebConfig.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public ViewResolver viewResolver() {
    final InternalResourceViewResolver bean = new InternalResourceViewResolver();
    bean.setViewClass(JstlView.class);
    bean.setPrefix("/WEB-INF/view/");
    bean.setSuffix(".jsp");
    bean.setOrder(0);
    return bean;
}
 
Example 6
Source File: WebConfig.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public ViewResolver viewResolver() {
    final InternalResourceViewResolver bean = new InternalResourceViewResolver();
    bean.setViewClass(JstlView.class);
    bean.setPrefix("/WEB-INF/view/");
    bean.setSuffix(".jsp");
    bean.setOrder(2);
    return bean;
}
 
Example 7
Source File: WebConfig.java    From redis-admin with Apache License 2.0 5 votes vote down vote up
@Bean
public InternalResourceViewResolver viewResolver() {
	InternalResourceViewResolver internalResourceViewResolver = new InternalResourceViewResolver();
    internalResourceViewResolver.setOrder(1);
    internalResourceViewResolver.setContentType("text/html; charset=utf-8");
    internalResourceViewResolver.setSuffix(".jsp");
    internalResourceViewResolver.setPrefix("/WEB-INF/view/");
    return internalResourceViewResolver;
}
 
Example 8
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
    viewResolverA.setPrefix("/WEB-INF/jsp/");
    viewResolverA.setSuffix(".jsp");
    viewResolverA.setOrder(1);
    return viewResolverA;
}
 
Example 9
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
    viewResolverA.setPrefix("/WEB-INF/jsp/");
    viewResolverA.setSuffix(".jsp");
    viewResolverA.setOrder(1);
    return viewResolverA;
}
 
Example 10
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
    viewResolverA.setPrefix("/WEB-INF/jsp/");
    viewResolverA.setSuffix(".jsp");
    viewResolverA.setOrder(1);
    return viewResolverA;
}
 
Example 11
Source File: SpringMvcConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver getViewResolver() {
    InternalResourceViewResolver resolver = new InternalResourceViewResolver();
    resolver.setPrefix("/WEB-INF/");
    resolver.setSuffix(".html");
    resolver.setOrder(3);
    return resolver;
}
 
Example 12
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
    viewResolverA.setPrefix("/WEB-INF/jsp/");
    viewResolverA.setSuffix(".jsp");
    viewResolverA.setOrder(1);
    return viewResolverA;
}
 
Example 13
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
    viewResolverA.setPrefix("/WEB-INF/jsp/");
    viewResolverA.setSuffix(".jsp");
    viewResolverA.setOrder(1);
    return viewResolverA;
}
 
Example 14
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
    viewResolverA.setPrefix("/WEB-INF/jsp/");
    viewResolverA.setSuffix(".jsp");
    viewResolverA.setOrder(1);
    return viewResolverA;
}
 
Example 15
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
    viewResolverA.setPrefix("/WEB-INF/jsp/");
    viewResolverA.setSuffix(".jsp");
    viewResolverA.setOrder(1);
    return viewResolverA;
}
 
Example 16
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
    viewResolverA.setPrefix("/WEB-INF/jsp/");
    viewResolverA.setSuffix(".jsp");
    viewResolverA.setOrder(1);
    return viewResolverA;
}
 
Example 17
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
    viewResolverA.setPrefix("/WEB-INF/jsp/");
    viewResolverA.setSuffix(".jsp");
    viewResolverA.setOrder(3);
    return viewResolverA;
}
 
Example 18
Source File: SpringMvcConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver getViewResolver() {
    InternalResourceViewResolver resolver = new InternalResourceViewResolver();
    resolver.setPrefix("/WEB-INF/");
    resolver.setSuffix(".html");
    resolver.setOrder(3);
    return resolver;
}
 
Example 19
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
    viewResolverA.setPrefix("/WEB-INF/jsp/");
    viewResolverA.setSuffix(".jsp");
    viewResolverA.setOrder(1);
    return viewResolverA;
}
 
Example 20
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
    viewResolverA.setPrefix("/WEB-INF/jsp/");
    viewResolverA.setSuffix(".jsp");
    viewResolverA.setOrder(1);
    return viewResolverA;
}