@Requires(classes=freemarker.template.Configuration.class) @ConfigurationProperties(value="micronaut.views.freemarker") public class FreemarkerViewsRendererConfigurationProperties extends freemarker.template.Configuration 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 java.lang.String |
DEFAULT_EXTENSION
The default extension.
|
static java.lang.String |
PREFIX |
ANGLE_BRACKET_TAG_SYNTAX, AUTO_DETECT_NAMING_CONVENTION, AUTO_DETECT_TAG_SYNTAX, AUTO_ESCAPING_POLICY_KEY, AUTO_ESCAPING_POLICY_KEY_CAMEL_CASE, AUTO_ESCAPING_POLICY_KEY_SNAKE_CASE, AUTO_IMPORT_KEY, AUTO_IMPORT_KEY_CAMEL_CASE, AUTO_IMPORT_KEY_SNAKE_CASE, AUTO_INCLUDE_KEY, AUTO_INCLUDE_KEY_CAMEL_CASE, AUTO_INCLUDE_KEY_SNAKE_CASE, CACHE_STORAGE_KEY, CACHE_STORAGE_KEY_CAMEL_CASE, CACHE_STORAGE_KEY_SNAKE_CASE, CAMEL_CASE_NAMING_CONVENTION, DEFAULT_ENCODING_KEY, DEFAULT_ENCODING_KEY_CAMEL_CASE, DEFAULT_ENCODING_KEY_SNAKE_CASE, DEFAULT_INCOMPATIBLE_ENHANCEMENTS, DEFAULT_INCOMPATIBLE_IMPROVEMENTS, DISABLE_AUTO_ESCAPING_POLICY, DOLLAR_INTERPOLATION_SYNTAX, ENABLE_IF_DEFAULT_AUTO_ESCAPING_POLICY, ENABLE_IF_SUPPORTED_AUTO_ESCAPING_POLICY, INCOMPATIBLE_ENHANCEMENTS, INCOMPATIBLE_IMPROVEMENTS, INCOMPATIBLE_IMPROVEMENTS_KEY, INCOMPATIBLE_IMPROVEMENTS_KEY_CAMEL_CASE, INCOMPATIBLE_IMPROVEMENTS_KEY_SNAKE_CASE, INTERPOLATION_SYNTAX_KEY, INTERPOLATION_SYNTAX_KEY_CAMEL_CASE, INTERPOLATION_SYNTAX_KEY_SNAKE_CASE, LEGACY_INTERPOLATION_SYNTAX, LEGACY_NAMING_CONVENTION, LOCALIZED_LOOKUP_KEY, LOCALIZED_LOOKUP_KEY_CAMEL_CASE, LOCALIZED_LOOKUP_KEY_SNAKE_CASE, NAMING_CONVENTION_KEY, NAMING_CONVENTION_KEY_CAMEL_CASE, NAMING_CONVENTION_KEY_SNAKE_CASE, OUTPUT_FORMAT_KEY, OUTPUT_FORMAT_KEY_CAMEL_CASE, OUTPUT_FORMAT_KEY_SNAKE_CASE, PARSED_DEFAULT_INCOMPATIBLE_ENHANCEMENTS, RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY, RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_CAMEL_CASE, RECOGNIZE_STANDARD_FILE_EXTENSIONS_KEY_SNAKE_CASE, REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY, REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY_CAMEL_CASE, REGISTERED_CUSTOM_OUTPUT_FORMATS_KEY_SNAKE_CASE, SQUARE_BRACKET_INTERPOLATION_SYNTAX, SQUARE_BRACKET_TAG_SYNTAX, STRICT_SYNTAX_KEY, STRICT_SYNTAX_KEY_CAMEL_CASE, STRICT_SYNTAX_KEY_SNAKE_CASE, TAB_SIZE_KEY, TAB_SIZE_KEY_CAMEL_CASE, TAB_SIZE_KEY_SNAKE_CASE, TAG_SYNTAX_KEY, TAG_SYNTAX_KEY_CAMEL_CASE, TAG_SYNTAX_KEY_SNAKE_CASE, TEMPLATE_CONFIGURATIONS_KEY, TEMPLATE_CONFIGURATIONS_KEY_CAMEL_CASE, TEMPLATE_CONFIGURATIONS_KEY_SNAKE_CASE, TEMPLATE_LOADER_KEY, TEMPLATE_LOADER_KEY_CAMEL_CASE, TEMPLATE_LOADER_KEY_SNAKE_CASE, TEMPLATE_LOOKUP_STRATEGY_KEY, TEMPLATE_LOOKUP_STRATEGY_KEY_CAMEL_CASE, TEMPLATE_LOOKUP_STRATEGY_KEY_SNAKE_CASE, TEMPLATE_NAME_FORMAT_KEY, TEMPLATE_NAME_FORMAT_KEY_CAMEL_CASE, TEMPLATE_NAME_FORMAT_KEY_SNAKE_CASE, TEMPLATE_UPDATE_DELAY_KEY, TEMPLATE_UPDATE_DELAY_KEY_CAMEL_CASE, TEMPLATE_UPDATE_DELAY_KEY_SNAKE_CASE, VERSION_2_3_0, VERSION_2_3_19, VERSION_2_3_20, VERSION_2_3_21, VERSION_2_3_22, VERSION_2_3_23, VERSION_2_3_24, VERSION_2_3_25, VERSION_2_3_26, VERSION_2_3_27, VERSION_2_3_28, WHITESPACE_STRIPPING_KEY, WHITESPACE_STRIPPING_KEY_CAMEL_CASE, WHITESPACE_STRIPPING_KEY_SNAKE_CASE
API_BUILTIN_ENABLED_KEY, API_BUILTIN_ENABLED_KEY_CAMEL_CASE, API_BUILTIN_ENABLED_KEY_SNAKE_CASE, ARITHMETIC_ENGINE_KEY, ARITHMETIC_ENGINE_KEY_CAMEL_CASE, ARITHMETIC_ENGINE_KEY_SNAKE_CASE, ATTEMPT_EXCEPTION_REPORTER_KEY, ATTEMPT_EXCEPTION_REPORTER_KEY_CAMEL_CASE, ATTEMPT_EXCEPTION_REPORTER_KEY_SNAKE_CASE, AUTO_FLUSH_KEY, AUTO_FLUSH_KEY_CAMEL_CASE, AUTO_FLUSH_KEY_SNAKE_CASE, BOOLEAN_FORMAT_KEY, BOOLEAN_FORMAT_KEY_CAMEL_CASE, BOOLEAN_FORMAT_KEY_SNAKE_CASE, CLASSIC_COMPATIBLE_KEY, CLASSIC_COMPATIBLE_KEY_CAMEL_CASE, CLASSIC_COMPATIBLE_KEY_SNAKE_CASE, CUSTOM_DATE_FORMATS_KEY, CUSTOM_DATE_FORMATS_KEY_CAMEL_CASE, CUSTOM_DATE_FORMATS_KEY_SNAKE_CASE, CUSTOM_NUMBER_FORMATS_KEY, CUSTOM_NUMBER_FORMATS_KEY_CAMEL_CASE, CUSTOM_NUMBER_FORMATS_KEY_SNAKE_CASE, DATE_FORMAT_KEY, DATE_FORMAT_KEY_CAMEL_CASE, DATE_FORMAT_KEY_SNAKE_CASE, DATETIME_FORMAT_KEY, DATETIME_FORMAT_KEY_CAMEL_CASE, DATETIME_FORMAT_KEY_SNAKE_CASE, LAZY_AUTO_IMPORTS_KEY, LAZY_AUTO_IMPORTS_KEY_CAMEL_CASE, LAZY_AUTO_IMPORTS_KEY_SNAKE_CASE, LAZY_IMPORTS_KEY, LAZY_IMPORTS_KEY_CAMEL_CASE, LAZY_IMPORTS_KEY_SNAKE_CASE, LOCALE_KEY, LOCALE_KEY_CAMEL_CASE, LOCALE_KEY_SNAKE_CASE, LOG_TEMPLATE_EXCEPTIONS_KEY, LOG_TEMPLATE_EXCEPTIONS_KEY_CAMEL_CASE, LOG_TEMPLATE_EXCEPTIONS_KEY_SNAKE_CASE, NEW_BUILTIN_CLASS_RESOLVER_KEY, NEW_BUILTIN_CLASS_RESOLVER_KEY_CAMEL_CASE, NEW_BUILTIN_CLASS_RESOLVER_KEY_SNAKE_CASE, NUMBER_FORMAT_KEY, NUMBER_FORMAT_KEY_CAMEL_CASE, NUMBER_FORMAT_KEY_SNAKE_CASE, OBJECT_WRAPPER_KEY, OBJECT_WRAPPER_KEY_CAMEL_CASE, OBJECT_WRAPPER_KEY_SNAKE_CASE, OUTPUT_ENCODING_KEY, OUTPUT_ENCODING_KEY_CAMEL_CASE, OUTPUT_ENCODING_KEY_SNAKE_CASE, SHOW_ERROR_TIPS_KEY, SHOW_ERROR_TIPS_KEY_CAMEL_CASE, SHOW_ERROR_TIPS_KEY_SNAKE_CASE, SQL_DATE_AND_TIME_TIME_ZONE_KEY, SQL_DATE_AND_TIME_TIME_ZONE_KEY_CAMEL_CASE, SQL_DATE_AND_TIME_TIME_ZONE_KEY_SNAKE_CASE, STRICT_BEAN_MODELS, STRICT_BEAN_MODELS_KEY, STRICT_BEAN_MODELS_KEY_CAMEL_CASE, STRICT_BEAN_MODELS_KEY_SNAKE_CASE, TEMPLATE_EXCEPTION_HANDLER_KEY, TEMPLATE_EXCEPTION_HANDLER_KEY_CAMEL_CASE, TEMPLATE_EXCEPTION_HANDLER_KEY_SNAKE_CASE, TIME_FORMAT_KEY, TIME_FORMAT_KEY_CAMEL_CASE, TIME_FORMAT_KEY_SNAKE_CASE, TIME_ZONE_KEY, TIME_ZONE_KEY_CAMEL_CASE, TIME_ZONE_KEY_SNAKE_CASE, URL_ESCAPING_CHARSET_KEY, URL_ESCAPING_CHARSET_KEY_CAMEL_CASE, URL_ESCAPING_CHARSET_KEY_SNAKE_CASE, WRAP_UNCHECKED_EXCEPTIONS_KEY, WRAP_UNCHECKED_EXCEPTIONS_KEY_CAMEL_CASE, WRAP_UNCHECKED_EXCEPTIONS_KEY_SNAKE_CASE
Constructor and Description |
---|
FreemarkerViewsRendererConfigurationProperties(ViewsConfiguration viewsConfiguration,
java.lang.String version,
io.micronaut.core.io.scan.ClassPathResourceLoader resourceLoader)
Default contructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultExtension() |
freemarker.template.Version |
getIncompatibleImprovements() |
boolean |
isEnabled() |
void |
setDefaultExtension(java.lang.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.
|
void |
setSettings(java.util.Properties props) |
clearEncodingMap, clearSharedVariables, clearTemplateCache, clone, doAutoImportsAndIncludes, getAutoEscapingPolicy, getCacheStorage, getCorrectedNameForUnknownSetting, getDefaultConfiguration, getDefaultEncoding, getDefaultObjectWrapper, getEncoding, getIncompatibleEnhancements, getInterpolationSyntax, getLocalizedLookup, getNamingConvention, getOutputFormat, getOutputFormat, getParsedIncompatibleEnhancements, getRecognizeStandardFileExtensions, getRegisteredCustomOutputFormats, getSettingNames, getSharedVariable, getSharedVariableNames, getStrictSyntaxMode, getSupportedBuiltInDirectiveNames, getSupportedBuiltInDirectiveNames, getSupportedBuiltInNames, getSupportedBuiltInNames, getTabSize, getTagSyntax, getTemplate, getTemplate, getTemplate, getTemplate, getTemplate, getTemplate, getTemplate, getTemplateConfigurations, getTemplateLoader, getTemplateLookupStrategy, getTemplateNameFormat, getTemplateUpdateDelayMilliseconds, getVersion, getVersionNumber, getWhitespaceStripping, isAttemptExceptionReporterExplicitlySet, isCacheStorageExplicitlySet, isDefaultEncodingExplicitlySet, isLocaleExplicitlySet, isLogTemplateExceptionsExplicitlySet, isObjectWrapperExplicitlySet, isOutputFormatExplicitlySet, isRecognizeStandardFileExtensionsExplicitlySet, isTemplateExceptionHandlerExplicitlySet, isTemplateLoaderExplicitlySet, isTemplateLookupStrategyExplicitlySet, isTemplateNameFormatExplicitlySet, isTimeZoneExplicitlySet, isWrapUncheckedExceptionsExplicitlySet, loadBuiltInEncodingMap, removeTemplateFromCache, removeTemplateFromCache, removeTemplateFromCache, removeTemplateFromCache, removeTemplateFromCache, removeTemplateFromCache, setAllSharedVariables, setAttemptExceptionReporter, setAutoEscapingPolicy, setCacheStorage, setClassForTemplateLoading, setClassLoaderForTemplateLoading, setDefaultConfiguration, setDefaultEncoding, setDirectoryForTemplateLoading, setEncoding, setIncompatibleEnhancements, setInterpolationSyntax, setLocale, setLocalizedLookup, setLogTemplateExceptions, setNamingConvention, setObjectWrapper, setOutputFormat, setRecognizeStandardFileExtensions, setRegisteredCustomOutputFormats, setServletContextForTemplateLoading, setSetting, setSharedVariable, setSharedVariable, setSharedVaribles, setStrictSyntaxMode, setTabSize, setTagSyntax, setTemplateConfigurations, setTemplateExceptionHandler, setTemplateLoader, setTemplateLookupStrategy, setTemplateNameFormat, setTemplateUpdateDelay, setTemplateUpdateDelayMilliseconds, setTimeZone, setWhitespaceStripping, setWrapUncheckedExceptions, unsetAttemptExceptionReporter, unsetCacheStorage, unsetDefaultEncoding, unsetLocale, unsetLogTemplateExceptions, unsetObjectWrapper, unsetOutputFormat, unsetRecognizeStandardFileExtensions, unsetTemplateExceptionHandler, unsetTemplateLoader, unsetTemplateLookupStrategy, unsetTemplateNameFormat, unsetTimeZone, unsetWrapUncheckedExceptions
addAutoImport, addAutoInclude, getArithmeticEngine, getAttemptExceptionReporter, getAutoFlush, getAutoImports, getAutoImportsWithoutFallback, getAutoIncludes, getAutoIncludesWithoutFallback, getBooleanFormat, getClassicCompatibleAsInt, getCustomAttribute, getCustomAttributeNames, getCustomDateFormat, getCustomDateFormats, getCustomDateFormatsWithoutFallback, getCustomNumberFormat, getCustomNumberFormats, getCustomNumberFormatsWithoutFallback, getDateFormat, getDateTimeFormat, getEnvironment, getLazyAutoImports, getLazyImports, getLocale, getLogTemplateExceptions, getNewBuiltinClassResolver, getNumberFormat, getObjectWrapper, getOutputEncoding, getParent, getSetting, getSettings, getShowErrorTips, getSQLDateAndTimeTimeZone, getTemplateExceptionHandler, getTimeFormat, getTimeZone, getURLEscapingCharset, getWrapUncheckedExceptions, hasCustomFormats, invalidSettingValueException, isAPIBuiltinEnabled, isAPIBuiltinEnabledSet, isArithmeticEngineSet, isAttemptExceptionReporterSet, isAutoFlushSet, isAutoImportsSet, isAutoIncludesSet, isBooleanFormatSet, isClassicCompatible, isClassicCompatibleSet, isCustomDateFormatsSet, isCustomNumberFormatsSet, isDateFormatSet, isDateTimeFormatSet, isLazyAutoImportsSet, isLazyImportsSet, isLocaleSet, isLogTemplateExceptionsSet, isNewBuiltinClassResolverSet, isNumberFormatSet, isObjectWrapperSet, isOutputEncodingSet, isShowErrorTipsSet, isSQLDateAndTimeTimeZoneSet, isTemplateExceptionHandlerSet, isTimeFormatSet, isTimeZoneSet, isURLEscapingCharsetSet, isWrapUncheckedExceptionsSet, parseAsImportList, parseAsList, parseAsSegmentedList, removeAutoImport, removeAutoInclude, removeCustomAttribute, setAPIBuiltinEnabled, setArithmeticEngine, setAutoFlush, setAutoImports, setAutoIncludes, setBooleanFormat, setClassicCompatible, setClassicCompatibleAsInt, setCustomAttribute, setCustomDateFormats, setCustomNumberFormats, setDateFormat, setDateTimeFormat, setLazyAutoImports, setLazyImports, setNewBuiltinClassResolver, setNumberFormat, setOutputEncoding, setSettings, setShowErrorTips, setSQLDateAndTimeTimeZone, setStrictBeanModels, setTimeFormat, settingValueAssignmentException, setURLEscapingCharset, unknownSettingException
public static final java.lang.String PREFIX
public static final java.lang.String DEFAULT_EXTENSION
public static final boolean DEFAULT_ENABLED
public FreemarkerViewsRendererConfigurationProperties(ViewsConfiguration viewsConfiguration, @Property(name="micronaut.views.freemarker.incompatible-improvements") @Nullable java.lang.String version, @Nullable io.micronaut.core.io.scan.ClassPathResourceLoader resourceLoader)
viewsConfiguration
- The views configurationversion
- The minimum versionresourceLoader
- The resource loaderpublic boolean isEnabled()
isEnabled
in interface io.micronaut.core.util.Toggleable
public void setEnabled(boolean enabled)
enabled
- True if they are.@Nonnull public java.lang.String getDefaultExtension()
getDefaultExtension
in interface FreemarkerViewsRendererConfiguration
public void setDefaultExtension(java.lang.String defaultExtension)
defaultExtension
- The default extensionpublic freemarker.template.Version getIncompatibleImprovements()
getIncompatibleImprovements
in interface freemarker.core.ParserConfiguration
getIncompatibleImprovements
in interface FreemarkerViewsRendererConfiguration
getIncompatibleImprovements
in class freemarker.template.Configuration
public void setIncompatibleImprovements(freemarker.template.Version incompatibleImprovements)
Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS
.setIncompatibleImprovements
in class freemarker.template.Configuration
incompatibleImprovements
- The version numberpublic void setSettings(@MapFormat(keyFormat=UNDER_SCORE_SEPARATED_LOWER_CASE) java.util.Properties props) throws freemarker.template.TemplateException
setSettings
in class freemarker.core.Configurable
freemarker.template.TemplateException