Class HandlebarsConfiguration
- java.lang.Object
-
- com.github.mjeanroy.springmvc.view.mustache.configuration.handlebars.HandlebarsConfiguration
-
@Configuration public class HandlebarsConfiguration extends Object
Configure handlebar template engine.
-
-
Constructor Summary
Constructors Constructor Description HandlebarsConfiguration(org.springframework.core.env.Environment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HandlebarsFactoryBeanhandlebarsCompiler()Build originalHandlebarscompiler that will be used to compile and render templates.MustacheCompilermustacheCompiler(com.github.jknack.handlebars.Handlebars handlebars, MustacheTemplateLoader templateLoader)Build mustache compiler.voidsetCustomizers(Collection<HandlebarsCustomizer> customizers)
-
-
-
Method Detail
-
setCustomizers
@Autowired(required=false) public void setCustomizers(Collection<HandlebarsCustomizer> customizers)
-
mustacheCompiler
@Bean public MustacheCompiler mustacheCompiler(com.github.jknack.handlebars.Handlebars handlebars, MustacheTemplateLoader templateLoader)
Build mustache compiler. This compiler use an instance ofHandlebarsunder the hood.- Parameters:
handlebars- Handlebars instance.templateLoader- Template loader.- Returns:
- Mustache compiler implementation.
-
handlebarsCompiler
@Bean public HandlebarsFactoryBean handlebarsCompiler()
Build originalHandlebarscompiler that will be used to compile and render templates.- Returns:
- Handlebars compiler.
-
-