@Requires(classes=freemarker.template.Configuration.class) @ConfigurationProperties(value="micronaut.views.freemarker") public class FreemarkerViewsRendererConfigurationProperties extends Object implements FreemarkerViewsRendererConfiguration
ConfigurationProperties
implementation of FreemarkerViewsRendererConfiguration
.
All configured properties are extracted from Configuration
and
Configurable
. All Freemarker properties names are reused in the micronaut
configuration.
If a value is not declared and is null, the default configuration from Freemarker is used. The expected
format of each value is the same from Freemarker, and no conversion or validation is done by Micronaut.
All Freemarker configuration documentation is published in their
site.Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static String |
DEFAULT_EXTENSION
The default extension.
|
static String |
PREFIX |
Constructor and Description |
---|
FreemarkerViewsRendererConfigurationProperties(ViewsConfiguration viewsConfiguration,
String version,
ClassPathResourceLoader resourceLoader)
Default contructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getDefaultExtension() |
freemarker.template.Version |
getIncompatibleImprovements() |
boolean |
isEnabled() |
void |
setDefaultExtension(String defaultExtension)
Sets the default extension to use.
|
void |
setEnabled(boolean enabled)
Whether freemarker views are enabled.
|
void |
setIncompatibleImprovements(freemarker.template.Version incompatibleImprovements)
the FreeMarker version number where the not 100% backward compatible bug fixes
and improvements that you want to enable were already implemented.
|
public static final String PREFIX
public static final String DEFAULT_EXTENSION
public static final boolean DEFAULT_ENABLED
public FreemarkerViewsRendererConfigurationProperties(ViewsConfiguration viewsConfiguration, @Property(name="micronaut.views.freemarker.incompatible-improvements") @Nullable String version, @Nullable ClassPathResourceLoader resourceLoader)
viewsConfiguration
- The views configurationversion
- The minimum versionresourceLoader
- The resource loaderpublic boolean isEnabled()
isEnabled
in interface Toggleable
public void setEnabled(boolean enabled)
enabled
- True if they are.@Nonnull public String getDefaultExtension()
getDefaultExtension
in interface FreemarkerViewsRendererConfiguration
public void setDefaultExtension(String defaultExtension)
defaultExtension
- The default extensionpublic freemarker.template.Version getIncompatibleImprovements()
getIncompatibleImprovements
in interface FreemarkerViewsRendererConfiguration
public void setIncompatibleImprovements(freemarker.template.Version incompatibleImprovements)
Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS
.incompatibleImprovements
- The version number