Configuration Reference

Version:4.1.0

Micronaut Views Core Config Properties

🔗
Table 1. Configuration Properties for ViewsConfigurationProperties
Property Type Description

micronaut.views.enabled

boolean

enabled getter.

micronaut.views.folder

java.lang.String

micronaut.views.dir

java.lang.String

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

🔗
Table 2. Configuration Properties for CspConfiguration
Property Type Description

micronaut.views.csp.enabled

boolean

micronaut.views.csp.policy-directives

java.lang.String

micronaut.views.csp.report-only

boolean

micronaut.views.csp.random-engine

java.util.Random

micronaut.views.csp.generate-nonce

boolean

If true, the CSP header will contain a generated nonce that is made available to view renderers. The nonce should change for each request/response cycle and can be used by views to authorize inlined script blocks.

micronaut.views.csp.force-secure-random

boolean

Sets whether SecureRandom is forced for use in generated nonce values. Defaults to false. Enabling this requires careful consideration, because SecureRandom will block infinitely without enough entropy.

micronaut.views.csp.filter-path

java.lang.String

🔗
Table 3. 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

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

java.lang.String

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

java.lang.String

Micronaut Views Fieldset Config Properties

🔗
Table 4. Configuration Properties for FormElementRendererViewsConfiguration
Property Type Description

micronaut.views.form-element.render.views.input-checkbox

java.lang.String

The view name for a field of type input checkbox.

micronaut.views.form-element.render.views.input-date

java.lang.String

The view name for a field of type input date.

micronaut.views.form-element.render.views.input-date-time-local

java.lang.String

The view name for a field of type input datetime-local.

micronaut.views.form-element.render.views.input-email

java.lang.String

The view name for a field of type input email.

micronaut.views.form-element.render.views.input-hidden

java.lang.String

The view name for a field of type input hidden.

micronaut.views.form-element.render.views.input-number

java.lang.String

The view name for a field of type input number.

micronaut.views.form-element.render.views.input-password

java.lang.String

The view name for a field of type input password.

micronaut.views.form-element.render.views.input-radio

java.lang.String

The view name for a field of type input radio.

micronaut.views.form-element.render.views.input-submit

java.lang.String

The view name for a field of type input submit.

micronaut.views.form-element.render.views.input-tel

java.lang.String

The view name for a field of type input tel.

micronaut.views.form-element.render.views.input-text

java.lang.String

The view name for a field of type input text.

micronaut.views.form-element.render.views.input-time

java.lang.String

The view name for a field of type input time.

micronaut.views.form-element.render.views.input-url

java.lang.String

The view name for a field of type input url.

micronaut.views.form-element.render.views.option

java.lang.String

The view name to render an option html element.

micronaut.views.form-element.render.views.select

java.lang.String

The view name for a field of type select.

micronaut.views.form-element.render.views.textarea

java.lang.String

The view name to render a textarea html element.

micronaut.views.form-element.render.views.trix-editor

java.lang.String

The view name for a field of type trix-editor.

🔗
Table 5. Configuration Properties for FormElementRendererConfigurationProperties
Property Type Description

micronaut.views.form-element.render.enabled

boolean

Enabled getter.

Micronaut Views Freemarker Config Properties

🔗
Table 6. Configuration Properties for FreemarkerViewsRendererConfigurationProperties
Property Type Description

micronaut.views.freemarker.classic-compatible

boolean

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

int

micronaut.views.freemarker.locale

java.util.Locale

micronaut.views.freemarker.c-format

freemarker.core.CFormat

micronaut.views.freemarker.time-zone

java.util.TimeZone

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.template-exception-handler

freemarker.template.TemplateExceptionHandler

micronaut.views.freemarker.attempt-exception-reporter

freemarker.template.AttemptExceptionReporter

micronaut.views.freemarker.arithmetic-engine

freemarker.core.ArithmeticEngine

micronaut.views.freemarker.object-wrapper

freemarker.template.ObjectWrapper

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.truncate-builtin-algorithm

freemarker.core.TruncateBuiltinAlgorithm

micronaut.views.freemarker.log-template-exceptions

boolean

micronaut.views.freemarker.wrap-unchecked-exceptions

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.strict-bean-models

boolean

micronaut.views.freemarker.settings

java.util.Properties

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

int

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

long

micronaut.views.freemarker.strict-syntax-mode

boolean

micronaut.views.freemarker.incompatible-enhancements

java.lang.String

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.fallback-on-null-loop-variable

boolean

micronaut.views.freemarker.default-encoding

java.lang.String

micronaut.views.freemarker.shared-variables

java.util.Map

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.enabled

boolean

Whether freemarker views are enabled.

micronaut.views.freemarker.default-extension

java.lang.String

micronaut.views.freemarker.incompatible-improvements

freemarker.template.Version

Micronaut Views Handlebars Config Properties

🔗
Table 7. Configuration Properties for HandlebarsViewsRendererConfigurationProperties
Property Type Description

micronaut.views.handlebars.enabled

boolean

enabled getter.

micronaut.views.handlebars.default-extension

java.lang.String

Micronaut Views Jte Config Properties

🔗
Table 8. Configuration Properties for JteViewsRendererConfigurationProperties
Property Type Description

micronaut.views.jte.dynamic

boolean

Whether to enable dynamic reloading of templates. Default value (false).

micronaut.views.jte.dynamic-path

java.lang.String

Root directory under which to write generated source and class files. . Default value ("build/jte-classes").

micronaut.views.jte.dynamic-source-path

java.lang.String

When using dynamic templates, the root source directory to search. If not specified, jte will search src/<sourceset>/jte and src/<sourceset>/resources/<folder> where 'folder' is ViewsConfiguration.getFolder(). In cases where the source directory cannot be found, jte will use classpath loading instead, and will not dynamically reload templates.

micronaut.views.jte.binary-static-content

boolean

Enable building binary content for templates. Default value (false). (Only has an effect when 'dynamic' is true. To use with precompiled templates, enable it in the build plugin)

Micronaut Views Pebble Config Properties

🔗
Table 9. Configuration Properties for PebbleConfigurationProperties
Property Type Description

micronaut.views.pebble.enabled

boolean

Sets whether the component is enabled. Default value (true).

micronaut.views.pebble.default-extension

java.lang.String

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

micronaut.views.pebble.cache-active

boolean

Enable/disable all caches, i.e. cache used by the engine to store compiled PebbleTemplate instances and tags cache. Default value (true).

micronaut.views.pebble.new-line-trimming

boolean

Changes the newLineTrimming setting of the PebbleEngine. By default, Pebble will trim a new line that immediately follows a Pebble tag. If set to false, then the first newline following a Pebble tag won’t be trimmed. All newlines will be preserved. Default value (true).

micronaut.views.pebble.auto-escaping

boolean

Sets whether or not escaping should be performed automatically. Default value (true).

micronaut.views.pebble.default-escaping-strategy

java.lang.String

Sets the default escaping strategy of the built-in escaper extension. Default value (EscapeFilter.HTML_ESCAPE_STRATEGY).

micronaut.views.pebble.strict-variables

boolean

Changes the strictVariables setting of the PebbleEngine. Default value (false).

micronaut.views.pebble.greedy-match-method

boolean

Enable/disable greedy matching mode for finding java method. Default is disabled. If enabled, when can not find perfect method (method name, parameter length and parameter type are all satisfied), reduce the limit of the parameter type, try to find other method which has compatible parameter types. Default value (false).

micronaut.views.pebble.allow-override-core-operators

boolean

Sets whether or not core operators overrides should be allowed. Default value (false).

micronaut.views.pebble.literal-decimals-as-integers

boolean

Enable/disable treat literal decimal as Integer. Default value (false), treated as Long.

micronaut.views.pebble.literal-numbers-as-big-decimals

boolean

Enable/disable treat literal numbers as BigDecimals. Default value (false), treated as Long/Double.

Micronaut Views Rocker Config Properties

🔗
Table 10. Configuration Properties for RockerViewsRendererConfigurationProperties
Property Type Description

micronaut.views.rocker.enabled

boolean

Enabled getter.

micronaut.views.rocker.default-extension

java.lang.String

micronaut.views.rocker.hot-reloading

boolean

Hot reloading getter.

micronaut.views.rocker.relaxed

boolean

Relaxed binding getter.

Micronaut Views Soy Config Properties

🔗
Table 11. Configuration Properties for SoyViewsRendererConfigurationProperties
Property Type Description

micronaut.views.soy.enabled

boolean

Whether Soy-backed views are enabled. Default value true

micronaut.views.soy.renaming-enabled

boolean

Specifies whether renaming is enabled. Defaults to true.

Micronaut Views Thymeleaf Config Properties

🔗
Table 12. Configuration Properties for ThymeleafViewsRendererConfigurationProperties
Property Type Description

micronaut.views.thymeleaf.character-encoding

java.lang.String

micronaut.views.thymeleaf.template-mode

org.thymeleaf.templatemode.TemplateMode

micronaut.views.thymeleaf.suffix

java.lang.String

micronaut.views.thymeleaf.force-suffix

boolean

micronaut.views.thymeleaf.force-template-mode

boolean

micronaut.views.thymeleaf.cache-ttlms

long

micronaut.views.thymeleaf.check-existence

boolean

micronaut.views.thymeleaf.cacheable

boolean

micronaut.views.thymeleaf.enabled

boolean

enabled getter.

micronaut.views.thymeleaf.cache-ttl

java.time.Duration

Sets the cache TTL as a duration.

Micronaut Views Velocity Config Properties

🔗
Table 13. Configuration Properties for VelocityViewsRendererConfigurationProperties
Property Type Description

micronaut.views.velocity.enabled

boolean

enabled getter.

micronaut.views.velocity.default-extension

java.lang.String