public final class ThymeleafModule extends ratpack.guice.ConfigurableModule<ThymeleafModule.Config>
To use it one has to register the module and then render Template instances.
Instances of Template can be created using one of the
Template.thymeleafTemplate(String, Map)
static methods.
By default templates are looked up in the thymeleaf directory of the application root with a .html suffix.
So thymeleafTemplate("my/template/path") maps to thymeleaf/my/template/path.html in the application root directory.
This can be configured using setTemplatesPrefix(String) and setTemplatesSuffix(String) as well as configuration of
ThymeleafModule.Config.templatesPrefix(String) and ThymeleafModule.Config.templateSuffix(String).
| Modifier and Type | Class and Description |
|---|---|
static class |
ThymeleafModule.Config
The configuration object for
ThymeleafModule. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_TEMPLATE_MODE |
static java.lang.String |
DEFAULT_TEMPLATE_PREFIX |
static java.lang.String |
DEFAULT_TEMPLATE_SUFFIX |
| Constructor and Description |
|---|
ThymeleafModule() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure() |
java.lang.String |
getTemplatesMode() |
java.lang.String |
getTemplatesPrefix() |
java.lang.String |
getTemplatesSuffix() |
void |
setTemplatesMode(java.lang.String templatesMode) |
void |
setTemplatesPrefix(java.lang.String templatesPrefix) |
void |
setTemplatesSuffix(java.lang.String templatesSuffix) |
configure, createConfig, defaultConfig, setConfigaddError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBindingpublic static final java.lang.String DEFAULT_TEMPLATE_MODE
public static final java.lang.String DEFAULT_TEMPLATE_PREFIX
public static final java.lang.String DEFAULT_TEMPLATE_SUFFIX
public java.lang.String getTemplatesMode()
public java.lang.String getTemplatesPrefix()
public java.lang.String getTemplatesSuffix()
public void setTemplatesMode(java.lang.String templatesMode)
public void setTemplatesPrefix(java.lang.String templatesPrefix)
public void setTemplatesSuffix(java.lang.String templatesSuffix)
protected void configure()
configure in class com.google.inject.AbstractModule