Configuration Reference

Version:1.2.0.RC1

Views Core Config Properties

🔗
Table 1. Configuration Properties for CspConfiguration
Property Type Description

micronaut.views.csp.enabled

boolean

Sets whether CSP is enabled. Default false.

micronaut.views.csp.policy-directives

java.lang.String

Sets the policy directives.

micronaut.views.csp.report-only

boolean

If true, the Content-Security-Policy-Report-Only header will be sent instead of Content-Security-Policy. Default false.

micronaut.views.csp.filter-path

java.lang.String

Sets the path the CSP filter should apply to. Default value "/**".

🔗
Table 2. Configuration Properties for SecurityViewModelProcessorConfigurationProperties
Property Type Description

micronaut.security.views-model-decorator.enabled

boolean

Enable {@link SecurityViewModelProcessor}. Default value (true).

micronaut.security.views-model-decorator.security-key

java.lang.String

Model key name. Default value ("security").

micronaut.security.views-model-decorator.principal-name-key

java.lang.String

Nested security map key for the user’s name property. Default value ("name").

micronaut.security.views-model-decorator.attributes-key

java.lang.String

Nested security map key for the user’s attributes property. Default value ("attributes").

🔗
Table 3. Configuration Properties for ViewsConfigurationProperties
Property Type Description

micronaut.views.enabled

boolean

Whether view rendering is enabled. Default value (true).

micronaut.views.folder

java.lang.String

The folder to look for views.

micronaut.views.dir

java.lang.String

The folder to look for views. Default value ("views").

Views Freemarker Config Properties

🔗
Table 4. Configuration Properties for FreemarkerViewsRendererConfigurationProperties
Property Type Description

micronaut.views.freemarker.template-loader

freemarker.cache.TemplateLoader

micronaut.views.freemarker.template-lookup-strategy

freemarker.cache.TemplateLookupStrategy

micronaut.views.freemarker.template-name-format

freemarker.cache.TemplateNameFormat

micronaut.views.freemarker.template-configurations

freemarker.cache.TemplateConfigurationFactory

micronaut.views.freemarker.cache-storage

freemarker.cache.CacheStorage

micronaut.views.freemarker.directory-for-template-loading

java.io.File

micronaut.views.freemarker.template-update-delay-milliseconds

long

micronaut.views.freemarker.object-wrapper

freemarker.template.ObjectWrapper

micronaut.views.freemarker.locale

java.util.Locale

micronaut.views.freemarker.time-zone

java.util.TimeZone

micronaut.views.freemarker.template-exception-handler

freemarker.template.TemplateExceptionHandler

micronaut.views.freemarker.attempt-exception-reporter

freemarker.template.AttemptExceptionReporter

micronaut.views.freemarker.log-template-exceptions

boolean

micronaut.views.freemarker.wrap-unchecked-exceptions

boolean

micronaut.views.freemarker.incompatible-improvements

freemarker.template.Version

micronaut.views.freemarker.whitespace-stripping

boolean

micronaut.views.freemarker.auto-escaping-policy

int

micronaut.views.freemarker.output-format

freemarker.core.OutputFormat

micronaut.views.freemarker.registered-custom-output-formats

java.util.Collection

micronaut.views.freemarker.recognize-standard-file-extensions

boolean

micronaut.views.freemarker.tag-syntax

int

micronaut.views.freemarker.interpolation-syntax

int

micronaut.views.freemarker.naming-convention

int

micronaut.views.freemarker.tab-size

int

micronaut.views.freemarker.default-encoding

java.lang.String

micronaut.views.freemarker.shared-varibles

java.util.Map

micronaut.views.freemarker.all-shared-variables

freemarker.template.TemplateHashModelEx

micronaut.views.freemarker.localized-lookup

boolean

micronaut.views.freemarker.classic-compatible

boolean

micronaut.views.freemarker.classic-compatible-as-int

int

micronaut.views.freemarker.sqldate-and-time-time-zone

java.util.TimeZone

micronaut.views.freemarker.number-format

java.lang.String

micronaut.views.freemarker.custom-number-formats

java.util.Map

micronaut.views.freemarker.boolean-format

java.lang.String

micronaut.views.freemarker.time-format

java.lang.String

micronaut.views.freemarker.date-format

java.lang.String

micronaut.views.freemarker.date-time-format

java.lang.String

micronaut.views.freemarker.custom-date-formats

java.util.Map

micronaut.views.freemarker.arithmetic-engine

freemarker.core.ArithmeticEngine

micronaut.views.freemarker.output-encoding

java.lang.String

micronaut.views.freemarker.urlescaping-charset

java.lang.String

micronaut.views.freemarker.new-builtin-class-resolver

freemarker.core.TemplateClassResolver

micronaut.views.freemarker.auto-flush

boolean

micronaut.views.freemarker.show-error-tips

boolean

micronaut.views.freemarker.apibuiltin-enabled

boolean

micronaut.views.freemarker.lazy-imports

boolean

micronaut.views.freemarker.lazy-auto-imports

java.lang.Boolean

micronaut.views.freemarker.auto-imports

java.util.Map

micronaut.views.freemarker.auto-includes

java.util.List

micronaut.views.freemarker.settings

java.util.Properties

micronaut.views.freemarker.enabled

boolean

Whether freemarker views are enabled.

micronaut.views.freemarker.default-extension

java.lang.String

Sets the default extension to use.

Views Handlebars Config Properties

🔗
Table 5. Configuration Properties for HandlebarsViewsRendererConfigurationProperties
Property Type Description

micronaut.views.handlebars.enabled

boolean

Whether handlebars view rendering is enabled. Default value (true).

micronaut.views.handlebars.default-extension

java.lang.String

The default extension. Default value ("hbs").

Views Thymeleaf Config Properties

🔗
Table 6. Configuration Properties for ThymeleafViewsRendererConfigurationProperties
Property Type Description

micronaut.views.thymeleaf.enabled

boolean

Sets whether thymeleaf rendering is enabled. Default value (true).

micronaut.views.thymeleaf.character-encoding

java.lang.String

Sets the character encoding to use. Default value ("UTF-8").

micronaut.views.thymeleaf.template-mode

org.thymeleaf.templatemode.TemplateMode

Sets the template mode.

micronaut.views.thymeleaf.suffix

java.lang.String

Sets the suffix to use.

micronaut.views.thymeleaf.force-suffix

boolean

Sets whether to force the suffix. Default value (false).

micronaut.views.thymeleaf.force-template-mode

boolean

Sets whether to force template mode. Default value (false).

micronaut.views.thymeleaf.cacheable

boolean

Sets whether templates are cacheable.

micronaut.views.thymeleaf.cache-ttlms

java.lang.Long

Sets the cache TTL in millis.

micronaut.views.thymeleaf.check-existence

boolean

Sets whether templates should be checked for existence.

micronaut.views.thymeleaf.cache-ttl

java.time.Duration

Sets the cache TTL as a duration.

Views Velocity Config Properties

🔗
Table 7. Configuration Properties for VelocityViewsRendererConfigurationProperties
Property Type Description

micronaut.views.velocity.enabled

boolean

Whether velocity views are enabled. Default value (true).

micronaut.views.velocity.default-extension

java.lang.String

Sets the defautlt extension to use for velocity templates. Default value ("vm").