當前位置: 首頁>>代碼示例>>Java>>正文


Java UrlBasedViewResolver.setViewClass方法代碼示例

本文整理匯總了Java中org.springframework.web.servlet.view.UrlBasedViewResolver.setViewClass方法的典型用法代碼示例。如果您正苦於以下問題:Java UrlBasedViewResolver.setViewClass方法的具體用法?Java UrlBasedViewResolver.setViewClass怎麽用?Java UrlBasedViewResolver.setViewClass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.springframework.web.servlet.view.UrlBasedViewResolver的用法示例。


在下文中一共展示了UrlBasedViewResolver.setViewClass方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: contentNegotiatingViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public ViewResolver contentNegotiatingViewResolver() {
    logger.debug("Configuring the ContentNegotiatingViewResolver");
    ContentNegotiatingViewResolver viewResolver = new ContentNegotiatingViewResolver();
    List<ViewResolver> viewResolvers = new ArrayList<ViewResolver>();

    UrlBasedViewResolver urlBasedViewResolver = new UrlBasedViewResolver();
    urlBasedViewResolver.setViewClass(JstlView.class);
    urlBasedViewResolver.setSuffix(".html");
    viewResolvers.add(urlBasedViewResolver);

    viewResolver.setViewResolvers(viewResolvers);

    List<View> defaultViews = new ArrayList<View>();
    defaultViews.add(new MappingJackson2JsonView());
    viewResolver.setDefaultViews(defaultViews);

    return viewResolver;
}
 
開發者ID:oncecloud,項目名稱:devops-cstack,代碼行數:20,代碼來源:CloudUnitApplicationContext.java

示例2: contentNegotiatingViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public ViewResolver contentNegotiatingViewResolver() {
    LOGGER.debug("Configuring the ContentNegotiatingViewResolver");
    ContentNegotiatingViewResolver viewResolver = new ContentNegotiatingViewResolver();
    List<ViewResolver> viewResolvers = new ArrayList<>();

    UrlBasedViewResolver urlBasedViewResolver = new UrlBasedViewResolver();
    urlBasedViewResolver.setViewClass(JstlView.class);
    urlBasedViewResolver.setPrefix("/WEB-INF/pages/");
    urlBasedViewResolver.setSuffix(".jsp");
    viewResolvers.add(urlBasedViewResolver);

    viewResolver.setViewResolvers(viewResolvers);

    List<View> defaultViews = new ArrayList<>();
    defaultViews.add(new MappingJackson2JsonView());
    viewResolver.setDefaultViews(defaultViews);

    return viewResolver;
}
 
開發者ID:flowable,項目名稱:flowable-engine,代碼行數:21,代碼來源:DispatcherServletConfiguration.java

示例3: contentNegotiatingViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public ViewResolver contentNegotiatingViewResolver(
        ContentNegotiationManager manager) {

    List< ViewResolver > resolvers = new ArrayList<ViewResolver>();

    UrlBasedViewResolver viewResolver = new UrlBasedViewResolver();
    viewResolver.setViewClass(TilesView.class);
    resolvers.add(viewResolver);

    JsonViewResolver r2 = new JsonViewResolver();
    resolvers.add(r2);

    ContentNegotiatingViewResolver resolver = new ContentNegotiatingViewResolver();
    resolver.setViewResolvers(resolvers);
    resolver.setContentNegotiationManager(manager);
    return resolver;

}
 
開發者ID:gill3s,項目名稱:opentipbot,代碼行數:20,代碼來源:WebAppContext.java

示例4: urlBasedViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public UrlBasedViewResolver urlBasedViewResolver() {
	UrlBasedViewResolver resolver = new UrlBasedViewResolver();
	resolver.setPrefix("/WEB-INF/views/");
	resolver.setSuffix(".jsp");
	resolver.setViewClass(JstlView.class);
	return resolver;
}
 
開發者ID:Azanx,項目名稱:Smart-Shopping,代碼行數:9,代碼來源:WebMvcConfig.java

示例5: setupViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public UrlBasedViewResolver setupViewResolver() {
    UrlBasedViewResolver resolver = new UrlBasedViewResolver();
    resolver.setPrefix("/WEB-INF/jsp/");
    resolver.setSuffix(".jsp");
    resolver.setViewClass(JstlView.class);
    return resolver;
}
 
開發者ID:marc0tjevp,項目名稱:Animal-Kingdom,代碼行數:9,代碼來源:Config.java

示例6: setupViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
/**
 * @return ViewResolver
 */
@Bean
public UrlBasedViewResolver setupViewResolver() {
    final UrlBasedViewResolver resolver = new UrlBasedViewResolver();
    resolver.setPrefix("/");
    resolver.setSuffix(".html");
    resolver.setViewClass(JstlView.class);
    return resolver;
}
 
開發者ID:MinBZK,項目名稱:OperatieBRP,代碼行數:12,代碼來源:WebConfiguratie.java

示例7: setupViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public UrlBasedViewResolver setupViewResolver() {
    UrlBasedViewResolver resolver = new UrlBasedViewResolver();
    resolver.setPrefix("/WEB-INF/views/");
    resolver.setSuffix(".jsp");
    resolver.setViewClass(JstlView.class);
    return resolver;
}
 
開發者ID:thecodinglive,項目名稱:hanbit-gradle-book-example,代碼行數:9,代碼來源:WebConfig.java

示例8: setUpJSPViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public UrlBasedViewResolver setUpJSPViewResolver() {
    UrlBasedViewResolver urlBasedViewResolver = new UrlBasedViewResolver();
    urlBasedViewResolver.setSuffix(".jsp");
    urlBasedViewResolver.setPrefix("/");
    urlBasedViewResolver.setViewClass(JstlView.class);
    return urlBasedViewResolver;
}
 
開發者ID:sheelsh,項目名稱:SpringRESTDemo,代碼行數:9,代碼來源:WebApplicationConfig.java

示例9: springfieldWebmvcRenderTilesView

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public UrlBasedViewResolver springfieldWebmvcRenderTilesView()throws Exception{
	UrlBasedViewResolver bean = new UrlBasedViewResolver();
	bean.setViewClass(TilesView.class);
	bean.setOrder(Ordered.LOWEST_PRECEDENCE);
	return bean;
}
 
開發者ID:u2ware,項目名稱:springfield,代碼行數:8,代碼來源:WebmvcRenderConfiguration.java

示例10: springfieldTilesView

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public UrlBasedViewResolver springfieldTilesView()throws Exception{
	UrlBasedViewResolver bean = new UrlBasedViewResolver();
	bean.setViewClass(TilesView.class);
	bean.setOrder(Ordered.LOWEST_PRECEDENCE);
	return bean;
}
 
開發者ID:u2ware,項目名稱:springfield,代碼行數:8,代碼來源:ContextWebmvcBase.java

示例11: tilesViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public UrlBasedViewResolver tilesViewResolver() 
{
    UrlBasedViewResolver bean = new UrlBasedViewResolver();
    bean.setViewClass(org.springframework.web.servlet.view.tiles3.TilesView.class);
    return bean;
}
 
開發者ID:ThiagoUriel,項目名稱:spring-agora-web,代碼行數:8,代碼來源:WebConfig.java

示例12: faceletsViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public UrlBasedViewResolver faceletsViewResolver() {
	UrlBasedViewResolver resolver = new UrlBasedViewResolver();
	resolver.setViewClass(JsfView.class);
	resolver.setPrefix("/WEB-INF/views/");
	resolver.setSuffix(".xhtml");
	return resolver;
}
 
開發者ID:yanaga-samples,項目名稱:academico,代碼行數:9,代碼來源:WebflowConfig.java

示例13: urlBasedViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public UrlBasedViewResolver urlBasedViewResolver() {
	UrlBasedViewResolver viewResolver = new UrlBasedViewResolver();
	
	viewResolver.setOrder(2);
	viewResolver.setViewClass(org.springframework.web.servlet.view.InternalResourceView.class);
	
	return viewResolver;
}
 
開發者ID:connect-group,項目名稱:thymeleaf-tdd,代碼行數:10,代碼來源:ThymesheetConfig.java

示例14: setupViewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public UrlBasedViewResolver setupViewResolver(){
    UrlBasedViewResolver ubvr = new UrlBasedViewResolver();
    ubvr.setPrefix("/WEB-INF/jsp/");
    ubvr.setSuffix(".jsp");
    ubvr.setViewClass(JstlView.class);
    return ubvr;
}
 
開發者ID:wwrrss,項目名稱:bitran,代碼行數:9,代碼來源:Config.java

示例15: viewResolver

import org.springframework.web.servlet.view.UrlBasedViewResolver; //導入方法依賴的package包/類
@Bean
public UrlBasedViewResolver viewResolver() {
    UrlBasedViewResolver resolver = new UrlBasedViewResolver();
    resolver.setViewClass(JstlView.class);
    resolver.setPrefix("/WEB-INF/jsp/");
    resolver.setSuffix(".jsp");
    return resolver;
}
 
開發者ID:IsNull,項目名稱:MyBot,代碼行數:9,代碼來源:SpringDemoWebApplication.java


注:本文中的org.springframework.web.servlet.view.UrlBasedViewResolver.setViewClass方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。