当前位置: 首页>>代码示例>>Java>>正文


Java InternalResourceViewResolver.setOrder方法代码示例

本文整理汇总了Java中org.springframework.web.servlet.view.InternalResourceViewResolver.setOrder方法的典型用法代码示例。如果您正苦于以下问题:Java InternalResourceViewResolver.setOrder方法的具体用法?Java InternalResourceViewResolver.setOrder怎么用?Java InternalResourceViewResolver.setOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.web.servlet.view.InternalResourceViewResolver的用法示例。


在下文中一共展示了InternalResourceViewResolver.setOrder方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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;
}
 
开发者ID:EnterKey,项目名称:enterkey-framework,代码行数:20,代码来源:Application.java

示例2: 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;
}
 
开发者ID:PacktPublishing,项目名称:Spring-5.0-Cookbook,代码行数:9,代码来源:SpringDispatcherConfig.java

示例3: 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;
}
 
开发者ID:PacktPublishing,项目名称:Spring-5.0-Cookbook,代码行数:9,代码来源:SpringMvcConfig.java

示例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(3);
    return viewResolverA;
}
 
开发者ID:PacktPublishing,项目名称:Spring-5.0-Cookbook,代码行数:9,代码来源:SpringDispatcherConfig.java

示例5: viewResolver

import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@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;
}
 
开发者ID:mauersu,项目名称:redis-admin,代码行数:10,代码来源:WebConfig.java

示例6: jspViewResolver

import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public InternalResourceViewResolver jspViewResolver() {
    InternalResourceViewResolver resolver = new InternalResourceViewResolver();
    resolver.setOrder(1);
    resolver.setPrefix("/WEB-INF/views/");
    resolver.setSuffix(".jsp");
    resolver.setRedirectHttp10Compatible(false);
    resolver.setViewClass(JstlView.class);
    return resolver;
}
 
开发者ID:srinikandula,项目名称:mybus,代码行数:11,代码来源:WebApplicationConfig.java

示例7: jspViewResolver

import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
/**
 * ViewResolver resolve the String return value from controller methods into templates (jsp or ftl).
 */
@Bean
public ViewResolver jspViewResolver() {
	final InternalResourceViewResolver resolver = new InternalResourceViewResolver();
	resolver.setOrder(255);
	resolver.setViewClass(JstlView.class);
	resolver.setPrefix("/WEB-INF/jsp/");
	resolver.setSuffix(".jsp");
	return resolver;
}
 
开发者ID:Katharsas,项目名称:GMM,代码行数:13,代码来源:ApplicationConfiguration.java

示例8: jspResolver

import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public InternalResourceViewResolver jspResolver() {
	InternalResourceViewResolver resolver = new InternalResourceViewResolver();
	resolver.setViewNames("/WEB-INF/*.jsp");
	resolver.setOrder(100);
	return resolver;
}
 
开发者ID:yangjm,项目名称:winlet,代码行数:8,代码来源:WinletAutoConfiguration.java

示例9: winletViewResolver

import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public InternalResourceViewResolver winletViewResolver() {
	InternalResourceViewResolver resolver = new InternalResourceViewResolver();
	resolver.setPrefix("/WEB-INF/views/");
	resolver.setSuffix(".jsp");
	resolver.setOrder(110);
	return resolver;
}
 
开发者ID:yangjm,项目名称:winlet,代码行数:9,代码来源:WinletAutoConfiguration.java

示例10: springfieldWebmvcRenderJstlView

import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public InternalResourceViewResolver springfieldWebmvcRenderJstlView() throws Exception{
	InternalResourceViewResolver bean = new InternalResourceViewResolver();
	bean.setOrder(Ordered.LOWEST_PRECEDENCE);
	return bean;
}
 
开发者ID:u2ware,项目名称:springfield,代码行数:7,代码来源:WebmvcRenderConfiguration.java

示例11: springfieldJstlView

import org.springframework.web.servlet.view.InternalResourceViewResolver; //导入方法依赖的package包/类
@Bean
public InternalResourceViewResolver springfieldJstlView() throws Exception{
	InternalResourceViewResolver bean = new InternalResourceViewResolver();
	bean.setOrder(Ordered.LOWEST_PRECEDENCE);
	return bean;
}
 
开发者ID:u2ware,项目名称:springfield,代码行数:7,代码来源:ContextWebmvcBase.java


注:本文中的org.springframework.web.servlet.view.InternalResourceViewResolver.setOrder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。