本文整理汇总了Java中org.springframework.web.servlet.view.InternalResourceViewResolver.setPrefix方法的典型用法代码示例。如果您正苦于以下问题:Java InternalResourceViewResolver.setPrefix方法的具体用法?Java InternalResourceViewResolver.setPrefix怎么用?Java InternalResourceViewResolver.setPrefix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.web.servlet.view.InternalResourceViewResolver
的用法示例。
在下文中一共展示了InternalResourceViewResolver.setPrefix方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupViewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public InternalResourceViewResolver setupViewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/");
resolver.setSuffix(".jsp");
resolver.setContentType("text/html; charset-utf-8");
resolver.setViewClass(JstlView.class);
return resolver;
}
示例2: viewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public ViewResolver viewResolver() {
ContentNegotiatingViewResolver resolver = new ContentNegotiatingViewResolver();
List<View> defaultViews = new ArrayList<View>();
defaultViews.add(new MappingJackson2JsonView());
resolver.setDefaultViews(defaultViews);
resolver.setOrder(0);
List<ViewResolver> viewResolvers = new ArrayList<ViewResolver>();
InternalResourceViewResolver internalResourceViewResolver = new InternalResourceViewResolver();
internalResourceViewResolver.setPrefix("/WEB-INF/view/");
internalResourceViewResolver.setSuffix(".jsp");
internalResourceViewResolver.setOrder(1);
viewResolvers.add(internalResourceViewResolver);
resolver.setViewResolvers(viewResolvers);
return resolver;
}
示例3: configureInternalResourceViewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public InternalResourceViewResolver configureInternalResourceViewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".jsp");
return resolver;
}
示例4: jspViewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public InternalResourceViewResolver jspViewResolver() {
InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
viewResolverA.setPrefix("/WEB-INF/jsp/");
viewResolverA.setSuffix(".jsp");
viewResolverA.setOrder(1);
return viewResolverA;
}
示例5: getViewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public InternalResourceViewResolver getViewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/");
resolver.setSuffix(".html");
resolver.setOrder(3);
return resolver;
}
示例6: jspViewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public InternalResourceViewResolver jspViewResolver() {
InternalResourceViewResolver viewResolverA = new InternalResourceViewResolver();
viewResolverA.setPrefix("/WEB-INF/jsp/");
viewResolverA.setSuffix(".jsp");
viewResolverA.setOrder(3);
return viewResolverA;
}
示例7: viewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public ViewResolver viewResolver() {
final InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setViewClass(JstlView.class);
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".jsp");
return resolver;
}
示例8: configureViewResolvers
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
super.configureViewResolvers(registry);
InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
viewResolver.setPrefix("/pages/");
viewResolver.setSuffix(".jsp");
registry.viewResolver(viewResolver);
}
示例9: getViewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public ViewResolver getViewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".jsp");
return resolver;
}
示例10: viewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public ViewResolver viewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/jsp/");
resolver.setSuffix(".jsp");
resolver.setExposeContextBeansAsAttributes(true);
return resolver;
}
示例11: configureViewResolvers
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
/**
* Configure ViewResolvers to deliver preferred views.
*/
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
viewResolver.setViewClass(JstlView.class);
viewResolver.setPrefix("/WEB-INF/views/");
viewResolver.setSuffix(".jsp");
registry.viewResolver(viewResolver);
}
示例12: viewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public ViewResolver viewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".jsp");
return resolver;
}
示例13: viewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public ViewResolver viewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".jsp");
resolver.setExposeContextBeansAsAttributes(true);
return resolver;
}
示例14: internalResourceViewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public InternalResourceViewResolver internalResourceViewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".jspx");
return resolver;
}
示例15: jspViewResolver
import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
/**
* The JSP view resolver is responsible for pointing out where the JSP files are located and which suffix they
* are using
* @return A new internal resource view resolver
*/
@Bean
public InternalResourceViewResolver jspViewResolver() {
final InternalResourceViewResolver bean = new InternalResourceViewResolver();
bean.setPrefix("/WEB-INF/views/");
bean.setSuffix(".jsp");
return bean;
}