com.github.saphyra.randwo.common.configuration.ThymeLeafConfig Maven / Gradle / Ivy
package com.github.saphyra.randwo.common.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.thymeleaf.templatemode.TemplateMode;
import org.thymeleaf.templateresolver.ClassLoaderTemplateResolver;
@Configuration
class ThymeLeafConfig {
@Bean
ClassLoaderTemplateResolver thymeLeafTemplateResolverConfig() {
ClassLoaderTemplateResolver templateResolver = new ClassLoaderTemplateResolver();
templateResolver.setPrefix("public/html/");
templateResolver.setSuffix(".html");
templateResolver.setTemplateMode(TemplateMode.HTML);
templateResolver.setCharacterEncoding("UTF-8");
templateResolver.setOrder(0);
return templateResolver;
}
}