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


Java ThymeleafViewResolver.setOrder方法代碼示例

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


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

示例1: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
@ConditionalOnMissingBean(name = "thymeleafViewResolver")
@ConditionalOnProperty(name = "spring.thymeleaf.enabled", matchIfMissing = true)
public ThymeleafViewResolver thymeleafViewResolver() {
	ThymeleafViewResolver resolver = new ThymeleafViewResolver();
	configureTemplateEngine(resolver, this.templateEngine);
	resolver.setCharacterEncoding(this.properties.getEncoding().name());
	resolver.setContentType(appendCharset(this.properties.getContentType(),
			resolver.getCharacterEncoding()));
	resolver.setExcludedViewNames(this.properties.getExcludedViewNames());
	resolver.setViewNames(this.properties.getViewNames());
	// This resolver acts as a fallback resolver (e.g. like a
	// InternalResourceViewResolver) so it needs to have low precedence
	resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 5);
	resolver.setCache(this.properties.isCache());
	return resolver;
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:18,代碼來源:AbstractThymeleafViewResolverConfiguration.java

示例2: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
@ConditionalOnMissingBean(name = "thymeleafViewResolver")
@ConditionalOnProperty(name = "spring.thymeleaf.enabled", matchIfMissing = true)
public ThymeleafViewResolver thymeleafViewResolver() {
	ThymeleafViewResolver resolver = new ThymeleafViewResolver();
	resolver.setTemplateEngine(this.templateEngine);
	resolver.setCharacterEncoding(this.properties.getEncoding().name());
	resolver.setContentType(appendCharset(this.properties.getContentType(),
			resolver.getCharacterEncoding()));
	resolver.setExcludedViewNames(this.properties.getExcludedViewNames());
	resolver.setViewNames(this.properties.getViewNames());
	// This resolver acts as a fallback resolver (e.g. like a
	// InternalResourceViewResolver) so it needs to have low precedence
	resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 5);
	resolver.setCache(this.properties.isCache());
	return resolver;
}
 
開發者ID:philwebb,項目名稱:spring-boot-concourse,代碼行數:18,代碼來源:ThymeleafAutoConfiguration.java

示例3: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
@ConditionalOnMissingBean(name = "thymeleafViewResolver")
@ConditionalOnProperty(name = "spring.thymeleaf.enabled", matchIfMissing = true)
public ThymeleafViewResolver thymeleafViewResolver() {
	ThymeleafViewResolver resolver = new ThymeleafViewResolver();
	resolver.setTemplateEngine(this.templateEngine);
	resolver.setCharacterEncoding(this.properties.getEncoding().name());
	resolver.setContentType(appendCharset(this.properties.getContentType(),
			resolver.getCharacterEncoding()));
	resolver.setExcludedViewNames(this.properties.getExcludedViewNames());
	resolver.setViewNames(this.properties.getViewNames());
	// This resolver acts as a fallback resolver (e.g. like a
	// InternalResourceViewResolver) so it needs to have low precedence
	resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 5);
	return resolver;
}
 
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:17,代碼來源:ThymeleafAutoConfiguration.java

示例4: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
public ThymeleafViewResolver thymeleafViewResolver()
{
    ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    resolver.setTemplateEngine(templateEngine());
    resolver.setOrder(1);
    resolver.setCharacterEncoding("UTF-8");
    return resolver;
}
 
開發者ID:scrumtracker,項目名稱:scrumtracker2017,代碼行數:10,代碼來源:ThymeleafConfig.java

示例5: viewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
public ViewResolver viewResolver() {
    ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    resolver.setTemplateEngine(templateEngine());
    resolver.setCharacterEncoding("UTF-8");
    resolver.setOrder(1);
    return resolver;
}
 
開發者ID:ArturWisniewski,項目名稱:ToDoApp-Spring,代碼行數:9,代碼來源:ThymeleafConfig.java

示例6: viewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
@Description("Thymeleaf view resolver")
public ViewResolver viewResolver(final SpringTemplateEngine templateEngine) {
    ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    resolver.setTemplateEngine(templateEngine);
    resolver.setCharacterEncoding("UTF-8");
    resolver.setCache(false);
    resolver.setOrder(1);
    return resolver;
}
 
開發者ID:PacktPublishing,項目名稱:Spring-Security-Third-Edition,代碼行數:11,代碼來源:ThymeleafConfig.java

示例7: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
@Description("Thymeleaf view resolver")
public ThymeleafViewResolver thymeleafViewResolver(final SpringTemplateEngine templateEngine) {
    ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    resolver.setTemplateEngine(templateEngine);
    resolver.setCharacterEncoding("UTF-8");
    resolver.setCache(false);
    resolver.setOrder(1);
    return resolver;
}
 
開發者ID:PacktPublishing,項目名稱:Spring-Security-Third-Edition,代碼行數:11,代碼來源:ThymeleafConfig.java

示例8: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
@ConditionalOnMissingBean(name = "thymeleafViewResolver")
@ConditionalOnProperty(name = "spring.thymeleaf.enabled", matchIfMissing = true)
public ThymeleafViewResolver thymeleafViewResolver() {
    ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    resolver.setTemplateEngine(this.engine);
    resolver.setCharacterEncoding("UTF-8");
    resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 5);
    resolver.setCache(true);
    return resolver;
}
 
開發者ID:bobxwang,項目名稱:springboot-scala-withswagger,代碼行數:12,代碼來源:Thymeleaf3Config.java

示例9: viewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
public ViewResolver viewResolver() {
    ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    resolver.setTemplateEngine(templateEngine());
    resolver.setOrder(1);
    resolver.setCache(true);
    resolver.setCharacterEncoding("UTF-8");
    return resolver;
}
 
開發者ID:KonkerLabs,項目名稱:konker-platform,代碼行數:10,代碼來源:WebMvcConfig.java

示例10: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
/**
 * Handles all views. This view resolver will be executed as first one by Spring.
 */
@Bean
public ViewResolver thymeleafViewResolver() {
    ThymeleafViewResolver vr = new ThymeleafViewResolver();
    vr.setTemplateEngine(templateEngine());
    vr.setCharacterEncoding("UTF-8");
    vr.setOrder(Ordered.HIGHEST_PRECEDENCE);
    return vr;
}
 
開發者ID:gustavoorsi,項目名稱:searchahouse.com,代碼行數:12,代碼來源:ThymeleafConfiguration.java

示例11: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
public ViewResolver thymeleafViewResolver() {
	ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
	viewResolver.setTemplateEngine(templateEngine());
	viewResolver.setOrder(1);
	viewResolver.setExcludedViewNames(new String[] { "*.xml" });
	return viewResolver;
}
 
開發者ID:interseroh,項目名稱:report-cockpit-birt-web,代碼行數:9,代碼來源:WebMvcConfig.java

示例12: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
public ThymeleafViewResolver thymeleafViewResolver(WebApplicationContext wac) {
    ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    SpringTemplateEngine templateEngine = new SpringTemplateEngine();
    ServletContextTemplateResolver templateResolver = new ServletContextTemplateResolver();
    templateResolver.setPrefix("/WEB-INF/templates/");
    templateResolver.setSuffix(".html");
    templateResolver.setTemplateMode("HTML5");
    templateResolver.setCharacterEncoding("UTF-8");
    templateEngine.setTemplateResolver(templateResolver);
    resolver.setTemplateEngine(templateEngine);
    resolver.setOrder(2);
    resolver.setApplicationContext(wac);
    resolver.setCharacterEncoding("UTF-8");

    //Enable the Spring Security Thymeleaf integration
    templateEngine.addDialect(new LayoutDialect());

    // caching
    String[] activeProfiles = env.getActiveProfiles();
    if (Arrays.asList(activeProfiles).contains("dev")) {
        log.info("DEV Profile is active. Disabling template caching.");
        templateResolver.setCacheable(false);
        templateEngine.setCacheManager(null);
        resolver.setCache(false);
    }
    return resolver;
}
 
開發者ID:acesinc,項目名稱:convergent-ui,代碼行數:29,代碼來源:MVCConfig.java

示例13: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
@ConditionalOnMissingBean(name = "thymeleafViewResolver")
@ConditionalOnProperty(name = "spring.thymeleaf.enabled", matchIfMissing = true)
public ThymeleafViewResolver thymeleafViewResolver() {
    ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    resolver.setTemplateEngine(this.templateEngine);
    resolver.setCharacterEncoding(this.properties.getEncoding());
    resolver.setContentType(appendCharset(this.properties.getContentType(), resolver.getCharacterEncoding()));
    resolver.setExcludedViewNames(this.properties.getExcludedViewNames());
    resolver.setViewNames(this.properties.getViewNames());
    setStaticVariables(resolver);
    resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 5);
    return resolver;
}
 
開發者ID:sercxtyf,項目名稱:onboard,代碼行數:15,代碼來源:ThymleafConfiguration.java

示例14: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
@ConditionalOnMissingBean(name = "thymeleafViewResolver")
public ThymeleafViewResolver thymeleafViewResolver() {
    final ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    resolver.setTemplateEngine(this.templateEngine);
    resolver.setCharacterEncoding(this.environment.getProperty("encoding", "UTF-8"));
    resolver.setContentType(appendCharset(this.environment.getProperty("contentType", "text/html"), resolver.getCharacterEncoding()));
    resolver.setExcludedViewNames(this.environment.getProperty("excludedViewNames", String[].class));
    resolver.setViewNames(this.environment.getProperty("viewNames", String[].class));
    resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 5);
    resolver.setCache(this.environment.getProperty("cache", Boolean.class, true));
    return resolver;
}
 
開發者ID:mhmxs,項目名稱:SpringClips,代碼行數:14,代碼來源:ThymeleafConfiguration.java

示例15: thymeleafViewResolver

import org.thymeleaf.spring4.view.ThymeleafViewResolver; //導入方法依賴的package包/類
@Bean
public ThymeleafViewResolver thymeleafViewResolver() {
	ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
	viewResolver.setTemplateEngine(thymeleafTemplateEngine());
	viewResolver.setCharacterEncoding("UTF-8");
	viewResolver.setOrder(2);
	return viewResolver;
}
 
開發者ID:fernaspiazu,項目名稱:recruiting-old-style,代碼行數:9,代碼來源:WebApplicationConfig.java


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