java.lang.Object
io.jooby.thymeleaf.ThymeleafModule.Builder
- Enclosing class:
- ThymeleafModule
Utility class for creating
TemplateEngine instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.thymeleaf.TemplateEnginebuild(io.jooby.Environment env) Creates a template engine and apply sensible defaults.setCacheable(boolean cacheable) Turn on/off cache.setCacheManager(org.thymeleaf.cache.ICacheManager cacheManager) Set a cache manager.setTemplateResolver(org.thymeleaf.templateresolver.ITemplateResolver templateResolver) Template resolver to use.setTemplatesPath(String templatesPath) Template path and resolve the path as file system location or fallback to classpath location.setTemplatesPath(Path templatesPath) Template path and configure a file system template resolver.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setTemplatesPath
Template path and resolve the path as file system location or fallback to classpath location.- Parameters:
templatesPath- Set template path.- Returns:
- This builder.
-
setTemplatesPath
Template path and configure a file system template resolver.- Parameters:
templatesPath- Set template path.- Returns:
- This builder.
-
setTemplateResolver
@NonNull public ThymeleafModule.Builder setTemplateResolver(@NonNull org.thymeleaf.templateresolver.ITemplateResolver templateResolver) Template resolver to use.- Parameters:
templateResolver- Template resolver to use.- Returns:
- This builder.
-
setCacheable
Turn on/off cache. By default cache is enabled when running indevortestmode.- Parameters:
cacheable- Turn on/off cache.- Returns:
- This builder.
-
setCacheManager
@NonNull public ThymeleafModule.Builder setCacheManager(@NonNull org.thymeleaf.cache.ICacheManager cacheManager) Set a cache manager.- Parameters:
cacheManager- Cache manager.- Returns:
- This builder.
-
build
@NonNull public org.thymeleaf.TemplateEngine build(@NonNull io.jooby.Environment env) Creates a template engine and apply sensible defaults.- Parameters:
env- Environment.- Returns:
- Template engine.
-