Search in sources :

Example 11 with SpringTemplateEngine

use of org.thymeleaf.spring4.SpringTemplateEngine in project yqq by yeycfri.

the class WebConfig method templateEngine.

@Bean
public TemplateEngine templateEngine(TemplateResolver templateResolver) {
    SpringTemplateEngine templateEngine = new SpringTemplateEngine();
    templateEngine.setTemplateResolver(templateResolver);
    return templateEngine;
}
Also used : SpringTemplateEngine(org.thymeleaf.spring4.SpringTemplateEngine) Bean(org.springframework.context.annotation.Bean)

Example 12 with SpringTemplateEngine

use of org.thymeleaf.spring4.SpringTemplateEngine in project tutorials by eugenp.

the class ThymeleafConfiguration method templateEngine.

@Bean
public SpringTemplateEngine templateEngine() {
    SpringTemplateEngine templateEngine = new SpringTemplateEngine();
    templateEngine.setTemplateResolver(thymeleafTemplateResolver());
    return templateEngine;
}
Also used : SpringTemplateEngine(org.thymeleaf.spring4.SpringTemplateEngine) Bean(org.springframework.context.annotation.Bean)

Example 13 with SpringTemplateEngine

use of org.thymeleaf.spring4.SpringTemplateEngine in project tutorials by eugenp.

the class TestConfig method templateEngine.

@Bean
public SpringTemplateEngine templateEngine() {
    final SpringTemplateEngine templateEngine = new SpringTemplateEngine();
    templateEngine.setTemplateResolver(templateResolver());
    return templateEngine;
}
Also used : SpringTemplateEngine(org.thymeleaf.spring4.SpringTemplateEngine) Bean(org.springframework.context.annotation.Bean)

Example 14 with SpringTemplateEngine

use of org.thymeleaf.spring4.SpringTemplateEngine in project irida by phac-nml.

the class IridaApiServicesConfig method exportUploadTemplateEngine.

/*
	 * Template engine for constructing ncbi export submissions
	 */
@Bean(name = "exportUploadTemplateEngine")
public SpringTemplateEngine exportUploadTemplateEngine() {
    SpringTemplateEngine exportUploadTemplateEngine = new SpringTemplateEngine();
    ClassLoaderTemplateResolver classLoaderTemplateResolver = new ClassLoaderTemplateResolver();
    classLoaderTemplateResolver.setPrefix("/ca/corefacility/bioinformatics/irida/export/");
    classLoaderTemplateResolver.setSuffix(".xml");
    classLoaderTemplateResolver.setTemplateMode(TemplateMode.XML);
    classLoaderTemplateResolver.setCharacterEncoding("UTF-8");
    exportUploadTemplateEngine.addTemplateResolver(classLoaderTemplateResolver);
    return exportUploadTemplateEngine;
}
Also used : SpringTemplateEngine(org.thymeleaf.spring4.SpringTemplateEngine) ClassLoaderTemplateResolver(org.thymeleaf.templateresolver.ClassLoaderTemplateResolver) LocalValidatorFactoryBean(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean)

Example 15 with SpringTemplateEngine

use of org.thymeleaf.spring4.SpringTemplateEngine in project gs-spring-security-3.2 by rwinch.

the class WebMvcConfiguration method templateEngine.

@Bean
public SpringTemplateEngine templateEngine(ClassLoaderTemplateResolver templateResolver) {
    SpringTemplateEngine templateEngine = new SpringTemplateEngine();
    templateEngine.setTemplateResolver(templateResolver);
    templateEngine.addDialect(new TilesDialect());
    return templateEngine;
}
Also used : SpringTemplateEngine(org.thymeleaf.spring4.SpringTemplateEngine) TilesDialect(org.thymeleaf.extras.tiles2.dialect.TilesDialect) Bean(org.springframework.context.annotation.Bean)

Aggregations

SpringTemplateEngine (org.thymeleaf.spring5.SpringTemplateEngine)15 Bean (org.springframework.context.annotation.Bean)13 SpringTemplateEngine (org.thymeleaf.spring4.SpringTemplateEngine)13 Test (org.junit.Test)11 ClassLoaderTemplateResolver (org.thymeleaf.templateresolver.ClassLoaderTemplateResolver)10 ArrayList (java.util.ArrayList)7 Context (org.thymeleaf.context.Context)6 ITemplateResolver (org.thymeleaf.templateresolver.ITemplateResolver)6 ThymeleafViewResolver (org.thymeleaf.spring4.view.ThymeleafViewResolver)3 DefaultTemplateResolver (org.thymeleaf.templateresolver.DefaultTemplateResolver)3 FileTemplateResolver (org.thymeleaf.templateresolver.FileTemplateResolver)3 StringTemplateResolver (org.thymeleaf.templateresolver.StringTemplateResolver)3 TemplateEngine (org.thymeleaf.TemplateEngine)2 CustomDialect (com.baeldung.dialect.CustomDialect)1 InstanceRepository (de.codecentric.boot.admin.server.domain.entities.InstanceRepository)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedHashSet (java.util.LinkedHashSet)1 Map (java.util.Map)1