use of org.springframework.web.servlet.view.InternalResourceViewResolver in project shiro by apache.
the class JspViewsConfig method jnlpViewResolver.
@Bean
@Order(0)
public ViewResolver jnlpViewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setViewClass(JstlView.class);
resolver.setPrefix("/WEB-INF/jnlp/");
resolver.setSuffix(".jsp");
return resolver;
}
use of org.springframework.web.servlet.view.InternalResourceViewResolver in project PublicCMS-preview by sanluan.
the class AdminConfig method jspViewResolver.
/**
* 视图层解析器,SpringBoot不支持jsp的加载路径
*
* @return jsp view resolver
*/
@Bean
public ViewResolver jspViewResolver() {
InternalResourceViewResolver bean = new InternalResourceViewResolver();
bean.setOrder(1);
bean.setPrefix("/WEB-INF/jsp/");
bean.setSuffix(".jsp");
bean.setContentType("text/html;charset=UTF-8");
cacheComponent.registerCachingViewResolverList(bean);
return bean;
}
use of org.springframework.web.servlet.view.InternalResourceViewResolver in project osms by malikov-yurii.
the class SpringMvc method configureViewResolver.
@Bean
public ViewResolver configureViewResolver() {
InternalResourceViewResolver viewResolve = new InternalResourceViewResolver();
viewResolve.setPrefix("");
viewResolve.setSuffix("");
return viewResolve;
}
use of org.springframework.web.servlet.view.InternalResourceViewResolver in project spring-framework by spring-projects.
the class ViewResolverRegistry method jsp.
/**
* Register JSP view resolver with the specified prefix and suffix.
* <p>When this method is invoked more than once, each call will register a
* new ViewResolver instance. Note that since it's not easy to determine
* if a JSP exists without forwarding to it, using multiple JSP-based view
* resolvers only makes sense in combination with the "viewNames" property
* on the resolver indicating which view names are handled by which resolver.
*/
public UrlBasedViewResolverRegistration jsp(String prefix, String suffix) {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix(prefix);
resolver.setSuffix(suffix);
this.viewResolvers.add(resolver);
return new UrlBasedViewResolverRegistration(resolver);
}
use of org.springframework.web.servlet.view.InternalResourceViewResolver in project spring-framework by spring-projects.
the class ViewResolverRegistryTests method jspDefaultValues.
@Test
public void jspDefaultValues() {
this.registry.jsp();
InternalResourceViewResolver resolver = checkAndGetResolver(InternalResourceViewResolver.class);
checkPropertyValues(resolver, "prefix", "/WEB-INF/", "suffix", ".jsp");
}
Aggregations