當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。