org.thymeleaf.spring4.view.ThymeleafViewResolver Java Examples

The following examples show how to use org.thymeleaf.spring4.view.ThymeleafViewResolver. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #2
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #3
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #4
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #5
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #6
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #7
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #8
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #9
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #10
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #11
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #12
Source File: WebConfig.java    From springBoot-study with Apache License 2.0 5 votes vote down vote up
@Bean
public ThymeleafViewResolver viewResolverThymeLeaf() {
    ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
    viewResolver.setTemplateEngine(templateEngine());
    viewResolver.setCharacterEncoding("utf-8");
    viewResolver.setViewNames(new String[]{"thymeleaf/*"});
    viewResolver.setOrder(1);
    return viewResolver;
}
 
Example #13
Source File: WebMvcConfig.java    From konker-platform with Apache License 2.0 5 votes vote down vote up
@Bean
public ViewResolver viewResolver() {
    ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    resolver.setTemplateEngine(templateEngine());
    resolver.setOrder(1);
    resolver.setCache(true);
    resolver.setCharacterEncoding("UTF-8");
    return resolver;
}
 
Example #14
Source File: ThymeleafConfig.java    From portal-de-servicos with MIT License 5 votes vote down vote up
@Bean
public ThymeleafViewResolver thymeleafViewResolver(SpringTemplateEngine templateEngine) {
    ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    resolver.setTemplateEngine(templateEngine);
    resolver.setCharacterEncoding("UTF-8");
    resolver.setContentType(TEXT_HTML_VALUE);
    resolver.setExcludedViewNames(new String[]{"*.xml"});
    return resolver;
}
 
Example #15
Source File: ThymeleafConfig.java    From portal-de-servicos with MIT License 5 votes vote down vote up
@Bean
public ThymeleafViewResolver xmlThymeleafViewResolver(SpringTemplateEngine templateEngine) {
    ThymeleafViewResolver resolver = new ThymeleafViewResolver();
    resolver.setTemplateEngine(templateEngine);
    resolver.setCharacterEncoding("UTF-8");
    resolver.setContentType(APPLICATION_XML_VALUE);
    resolver.setExcludedViewNames(new String[]{"*.html"});
    return resolver;
}
 
Example #16
Source File: ThymleafConfiguration.java    From onboard with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example #17
Source File: ThymleafConfiguration.java    From onboard with Apache License 2.0 5 votes vote down vote up
private void setStaticVariables(ThymeleafViewResolver resolver) {
    Map<String, Object> staticVaribales = Maps.newHashMap();
    if (profile.equals(PRODUCT)) {
        staticVaribales.put("headTemplateName", "fragments/build/CommonHTMLHead");
    } else {
        staticVaribales.put("headTemplateName", "fragments/CommonHTMLHead");
    }
    includePluginStatics(staticVaribales);
    resolver.setStaticVariables(staticVaribales);
}
 
Example #18
Source File: WebConfig.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public ViewResolver thymeleafViewResolver() {
    final ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
    viewResolver.setTemplateEngine(templateEngine());
    viewResolver.setOrder(1);
    return viewResolver;
}
 
Example #19
Source File: TestConfig.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public ViewResolver thymeleafViewResolver() {
    final ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
    viewResolver.setTemplateEngine(templateEngine());
    viewResolver.setOrder(1);
    return viewResolver;
}
 
Example #20
Source File: WebConfig.java    From spring4-sandbox with Apache License 2.0 5 votes vote down vote up
@Bean
public ViewResolver viewResolver() {
	ThymeleafViewResolver resolver = new ThymeleafViewResolver();
	resolver.setApplicationContext(applicationContext);
	resolver.setTemplateEngine(templateEngine());
	resolver.setCharacterEncoding("UTF-8");
	return resolver;
}
 
Example #21
Source File: WebMvcConfig.java    From thymeleafexamples-layouts with Apache License 2.0 5 votes vote down vote up
@Bean
public ViewResolver viewResolver() {
    ThymeleafViewResolver thymeleafViewResolver = new ThymeleafViewResolver();
    thymeleafViewResolver.setTemplateEngine(templateEngine());
    thymeleafViewResolver.setCharacterEncoding("UTF-8");
    return thymeleafViewResolver;
}
 
Example #22
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #23
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #24
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #25
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #26
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #27
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #28
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #29
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}
 
Example #30
Source File: ThymeleafConfig.java    From Spring-Security-Third-Edition with MIT License 5 votes vote down vote up
@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;
}