Micronaut Views Configuration Reference

Every documented configuration property of Micronaut Views, with types, descriptions, and defaults.

Micronaut Views documentation

172 properties across 14 sections

Micronaut Views Core Config Properties

Configuration properties for CsrfViewModelProcessorConfigurationProperties

PropertyTypeDescription
micronaut.security.csrf.views-model-decorator.csrf-token-keyjava.lang.StringModel key for CSRF Token. Default value ("csrfToken").
micronaut.security.csrf.views-model-decorator.enabledbooleanEnable {@link CsrfViewModelProcessor}. Default value (true).

Configuration properties for SecurityViewModelProcessorConfigurationProperties

PropertyTypeDescription
micronaut.security.views-model-decorator.enabledbooleanEnable {@link SecurityViewModelProcessor}. Default value (true).
micronaut.security.views-model-decorator.security-keyjava.lang.StringModel key name. Default value ("security").
micronaut.security.views-model-decorator.principal-name-keyjava.lang.StringNested security map key for the user’s name property. Default value ("name").
micronaut.security.views-model-decorator.attributes-keyjava.lang.StringNested security map key for the user’s attributes property. Default value ("attributes").

Configuration properties for ViewsConfigurationProperties

PropertyTypeDescription
micronaut.views.enabledbooleanWhether view rendering is enabled. Default value (true).
micronaut.views.folderjava.lang.StringThe resources' folder where views should be searched for. Default value ("views").
micronaut.views.dirjava.lang.StringThe folder to look for views. Default value ("views").

Configuration properties for CspConfiguration

PropertyTypeDescription
micronaut.views.csp.enabledbooleanSets whether CSP is enabled. Default value (false).
micronaut.views.csp.policy-directivesjava.lang.StringSets the policy directives.
micronaut.views.csp.report-onlybooleanIf true, the Content-Security-Policy-Report-Only header will be sent instead of Content-Security-Policy. Default value (false).
micronaut.views.csp.random-enginejava.util.RandomSets the Random data engine used to generate nonce values. Ignored if forceSecureRandom is set to true .
micronaut.views.csp.generate-noncebooleanIf 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-randombooleanSets 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-pathjava.lang.StringSets the path the CSP filter should apply to. Default value ("/**").

Configuration properties for ViewsFilterConfiguration

PropertyTypeDescription
micronaut.views.filter.enabledbooleanSets whether the filter is enabled.

Micronaut Views Fieldset Config Properties

Configuration properties for FormElementRendererConfigurationProperties

PropertyTypeDescription
micronaut.views.form-element.render.enabledbooleanWhether form element rendering is enabled. Default value (true).

Configuration properties for FormElementRendererViewsConfiguration

PropertyTypeDescription
micronaut.views.form-element.render.views.input-checkboxjava.lang.StringThe view name for a field of type input checkbox.
micronaut.views.form-element.render.views.input-datejava.lang.StringThe view name for a field of type input date.
micronaut.views.form-element.render.views.input-date-time-localjava.lang.StringThe view name for a field of type input datetime-local.
micronaut.views.form-element.render.views.input-emailjava.lang.StringThe view name for a field of type input email.
micronaut.views.form-element.render.views.input-hiddenjava.lang.StringThe view name for a field of type input hidden.
micronaut.views.form-element.render.views.input-numberjava.lang.StringThe view name for a field of type input number.
micronaut.views.form-element.render.views.input-passwordjava.lang.StringThe view name for a field of type input password.
micronaut.views.form-element.render.views.input-radiojava.lang.StringThe view name for a field of type input radio.
micronaut.views.form-element.render.views.input-submitjava.lang.StringThe view name for a field of type input submit.
micronaut.views.form-element.render.views.input-teljava.lang.StringThe view name for a field of type input tel.
micronaut.views.form-element.render.views.input-textjava.lang.StringThe view name for a field of type input text.
micronaut.views.form-element.render.views.input-timejava.lang.StringThe view name for a field of type input time.
micronaut.views.form-element.render.views.input-urljava.lang.StringThe view name for a field of type input url.
micronaut.views.form-element.render.views.optionjava.lang.StringThe view name to render an option html element.
micronaut.views.form-element.render.views.selectjava.lang.StringThe view name for a field of type select.
micronaut.views.form-element.render.views.textareajava.lang.StringThe view name to render a textarea html element.
micronaut.views.form-element.render.views.trix-editorjava.lang.StringThe view name for a field of type trix-editor.

Micronaut Views Freemarker Config Properties

Configuration properties for FreemarkerViewsRendererConfigurationProperties

PropertyTypeDescription
micronaut.views.freemarker.classic-compatibleboolean
micronaut.views.freemarker.classic-compatible-as-intint
micronaut.views.freemarker.localejava.util.Locale
micronaut.views.freemarker.c-formatfreemarker.core.CFormat
micronaut.views.freemarker.time-zonejava.util.TimeZone
micronaut.views.freemarker.sqldate-and-time-time-zonejava.util.TimeZone
micronaut.views.freemarker.number-formatjava.lang.String
micronaut.views.freemarker.custom-number-formatsjava.util.Map
micronaut.views.freemarker.boolean-formatjava.lang.String
micronaut.views.freemarker.time-formatjava.lang.String
micronaut.views.freemarker.date-formatjava.lang.String
micronaut.views.freemarker.date-time-formatjava.lang.String
micronaut.views.freemarker.custom-date-formatsjava.util.Map
micronaut.views.freemarker.template-exception-handlerfreemarker.template.TemplateExceptionHandler
micronaut.views.freemarker.attempt-exception-reporterfreemarker.template.AttemptExceptionReporter
micronaut.views.freemarker.arithmetic-enginefreemarker.core.ArithmeticEngine
micronaut.views.freemarker.object-wrapperfreemarker.template.ObjectWrapper
micronaut.views.freemarker.output-encodingjava.lang.String
micronaut.views.freemarker.urlescaping-charsetjava.lang.String
micronaut.views.freemarker.new-builtin-class-resolverfreemarker.core.TemplateClassResolver
micronaut.views.freemarker.auto-flushboolean
micronaut.views.freemarker.show-error-tipsboolean
micronaut.views.freemarker.apibuiltin-enabledboolean
micronaut.views.freemarker.truncate-builtin-algorithmfreemarker.core.TruncateBuiltinAlgorithm
micronaut.views.freemarker.log-template-exceptionsboolean
micronaut.views.freemarker.wrap-unchecked-exceptionsboolean
micronaut.views.freemarker.lazy-importsboolean
micronaut.views.freemarker.lazy-auto-importsjava.lang.Boolean
micronaut.views.freemarker.auto-importsjava.util.Map
micronaut.views.freemarker.auto-includesjava.util.List
micronaut.views.freemarker.strict-bean-modelsboolean
micronaut.views.freemarker.settingsjava.util.Properties
micronaut.views.freemarker.template-loaderfreemarker.cache.TemplateLoader
micronaut.views.freemarker.template-lookup-strategyfreemarker.cache.TemplateLookupStrategy
micronaut.views.freemarker.template-name-formatfreemarker.cache.TemplateNameFormat
micronaut.views.freemarker.template-configurationsfreemarker.cache.TemplateConfigurationFactory
micronaut.views.freemarker.cache-storagefreemarker.cache.CacheStorage
micronaut.views.freemarker.directory-for-template-loadingjava.io.File
micronaut.views.freemarker.template-update-delayint
micronaut.views.freemarker.template-update-delay-millisecondslong
micronaut.views.freemarker.strict-syntax-modeboolean
micronaut.views.freemarker.incompatible-enhancementsjava.lang.String
micronaut.views.freemarker.whitespace-strippingboolean
micronaut.views.freemarker.auto-escaping-policyint
micronaut.views.freemarker.output-formatfreemarker.core.OutputFormat
micronaut.views.freemarker.registered-custom-output-formatsjava.util.Collection
micronaut.views.freemarker.recognize-standard-file-extensionsboolean
micronaut.views.freemarker.tag-syntaxint
micronaut.views.freemarker.interpolation-syntaxint
micronaut.views.freemarker.naming-conventionint
micronaut.views.freemarker.tab-sizeint
micronaut.views.freemarker.fallback-on-null-loop-variableboolean
micronaut.views.freemarker.default-encodingjava.lang.String
micronaut.views.freemarker.shared-variablesjava.util.Map
micronaut.views.freemarker.shared-variblesjava.util.Map
micronaut.views.freemarker.all-shared-variablesfreemarker.template.TemplateHashModelEx
micronaut.views.freemarker.localized-lookupboolean
micronaut.views.freemarker.enabledbooleanWhether freemarker views are enabled.
micronaut.views.freemarker.default-extensionjava.lang.StringSets the default extension to use.
micronaut.views.freemarker.incompatible-improvementsfreemarker.template.Versionthe FreeMarker version number where the not 100% backward compatible bug fixes and improvements that you want to enable were already implemented. Defaults to {@link Configuration#DEFAULT_INCOMPATIBLE_IMPROVEMENTS}.

Micronaut Views Handlebars Config Properties

Configuration properties for HandlebarsViewsRendererConfigurationProperties

PropertyTypeDescription
micronaut.views.handlebars.enabledbooleanWhether handlebars view rendering is enabled. Default value (true).
micronaut.views.handlebars.default-extensionjava.lang.StringThe default extension. Default value ("hbs").

Micronaut Views Htmx Config Properties

Configuration properties for HtmxConfigurationProperties

PropertyTypeDescription
micronaut.views.htmx.enabledbooleanWhether the htmx integration is enabled. Default value (true).

Micronaut Views Jinjava Config Properties

Configuration properties for JinjavaViewsRendererConfigurationProperties

PropertyTypeDescription
micronaut.views.jinja.enabledbooleanWhether Jinjava Views rendering is enabled
micronaut.views.jinja.default-extensionjava.lang.StringThe default template extension

Configuration properties for JinjavaConfig$Builder

PropertyTypeDescription
micronaut.views.jinja.config.charsetjava.nio.charset.Charset
micronaut.views.jinja.config.localejava.util.Locale
micronaut.views.jinja.config.time-zonejava.time.ZoneId
micronaut.views.jinja.config.disabledjava.util.Map
micronaut.views.jinja.config.restricted-methodsjava.util.Set
micronaut.views.jinja.config.restricted-propertiesjava.util.Set
micronaut.views.jinja.config.max-render-depthint
micronaut.views.jinja.config.random-number-generator-strategycom.hubspot.jinjava.random.RandomNumberGeneratorStrategy
micronaut.views.jinja.config.date-time-providercom.hubspot.jinjava.objects.date.DateTimeProvider
micronaut.views.jinja.config.trim-blocksboolean
micronaut.views.jinja.config.lstrip-blocksboolean
micronaut.views.jinja.config.enable-recursive-macro-callsboolean
micronaut.views.jinja.config.max-macro-recursion-depthint
micronaut.views.jinja.config.read-only-resolverboolean
micronaut.views.jinja.config.el-resolverjinjava.javax.el.ELResolver
micronaut.views.jinja.config.fail-on-unknown-tokensboolean
micronaut.views.jinja.config.max-output-sizelong
micronaut.views.jinja.config.nested-interpretation-enabledboolean
micronaut.views.jinja.config.validation-modeboolean
micronaut.views.jinja.config.max-string-lengthlong
micronaut.views.jinja.config.max-list-sizeint
micronaut.views.jinja.config.max-map-sizeint
micronaut.views.jinja.config.range-limitint
micronaut.views.jinja.config.max-num-deferred-tokensint
micronaut.views.jinja.config.interperter-factorycom.hubspot.jinjava.interpret.InterpreterFactory
micronaut.views.jinja.config.token-scanner-symbolscom.hubspot.jinjava.tree.parse.TokenScannerSymbols
micronaut.views.jinja.config.execution-modecom.hubspot.jinjava.mode.ExecutionMode
micronaut.views.jinja.config.legacy-overridescom.hubspot.jinjava.LegacyOverrides
micronaut.views.jinja.config.enable-precise-divide-filterboolean
micronaut.views.jinja.config.enable-filter-chain-optimizationboolean
micronaut.views.jinja.config.object-mappercom.fasterxml.jackson.databind.ObjectMapper
micronaut.views.jinja.config.object-unwrappercom.hubspot.jinjava.el.ObjectUnwrapper
micronaut.views.jinja.config.processorscom.hubspot.jinjava.el.JinjavaProcessors
micronaut.views.jinja.config.feature-configcom.hubspot.jinjava.features.FeatureConfig

Micronaut Views Jte Config Properties

Configuration properties for JteViewsRendererConfigurationProperties

PropertyTypeDescription
micronaut.views.jte.dynamicbooleanWhether to enable dynamic reloading of templates. Default value (false).
micronaut.views.jte.dynamic-pathjava.lang.StringRoot directory under which to write generated source and class files. . Default value ("build/jte-classes").
micronaut.views.jte.dynamic-source-pathjava.lang.StringWhen 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-contentbooleanEnable 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

Configuration properties for PebbleConfigurationProperties

PropertyTypeDescription
micronaut.views.pebble.enabledbooleanSets whether the component is enabled. Default value (true).
micronaut.views.pebble.default-extensionjava.lang.StringThe default extension. Default value ("html").
micronaut.views.pebble.cache-activebooleanEnable/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-trimmingbooleanChanges 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-escapingbooleanSets whether or not escaping should be performed automatically. Default value (true).
micronaut.views.pebble.default-escaping-strategyjava.lang.StringSets the default escaping strategy of the built-in escaper extension. Default value (EscapeFilter.HTML_ESCAPE_STRATEGY).
micronaut.views.pebble.strict-variablesbooleanChanges the strictVariables setting of the PebbleEngine. Default value (false).
micronaut.views.pebble.greedy-match-methodbooleanEnable/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-operatorsbooleanSets whether or not core operators overrides should be allowed. Default value (false).
micronaut.views.pebble.literal-decimals-as-integersbooleanEnable/disable treat literal decimal as Integer. Default value (false), treated as Long.
micronaut.views.pebble.literal-numbers-as-big-decimalsbooleanEnable/disable treat literal numbers as BigDecimals. Default value (false), treated as Long/Double.

Micronaut Views React Config Properties

Configuration properties for ReactViewsRendererConfiguration

PropertyTypeDescriptionDefault
micronaut.views.react.client-bundle-urljava.lang.Stringthe URL (relative or absolute) where the client Javascript bundle can be found. It will be appended to the generated HTML in a <script> tag. Defaults to "/static/client.js"/static/client.js
micronaut.views.react.server-bundle-pathjava.lang.Stringthe path relative to micronaut.views.folder where the bundle used for server-side rendering can be found. Defaults to "classpath:views/ssr-components.mjs"classpath:views/ssr-components.mjs
micronaut.views.react.render-scriptjava.lang.StringEither a file path (starting with "file:" or a resource in the classpath (starting with "classpath:") to a render script. Please see the user guide for more information on what this Javascript file should contain.classpath:io/micronaut/views/react/react.js
micronaut.views.react.sandboxbooleanIf true, GraalJS sandboxing is enabled. This helps protect you against supply chain attacks that might inject code into your server via hijacked React components. It requires a sufficiently new version of GraalJS. Defaults to OFF.false

Micronaut Views Rocker Config Properties

Configuration properties for RockerViewsRendererConfigurationProperties

PropertyTypeDescription
micronaut.views.rocker.enabledbooleanWhether Rocker views are enabled. Default value (true).
micronaut.views.rocker.default-extensionjava.lang.StringSets the default extension to use for Rocker templates. Default value ("rocker.html").
micronaut.views.rocker.hot-reloadingbooleanWhether hot reloading is enabled. Default value (false). Hot reloading requires an additional dependency on {@code com.fizzed:rocker-compiler:1.2.3:provided}.
micronaut.views.rocker.relaxedbooleanWhether relaxed binding is enabled for dynamic templates. Default value (false).

Micronaut Views Soy Config Properties

Configuration properties for SoyViewsRendererConfigurationProperties

PropertyTypeDescription
micronaut.views.soy.enabledbooleanWhether Soy-backed views are enabled. Default value (true).
micronaut.views.soy.renaming-enabledbooleanTurns renaming on or off. Default value (true).

Micronaut Views Thymeleaf Config Properties

Configuration properties for ThymeleafViewsRendererConfigurationProperties

PropertyTypeDescription
micronaut.views.thymeleaf.character-encodingjava.lang.StringSets the character encoding to use. Default value ("UTF-8").
micronaut.views.thymeleaf.template-modeorg.thymeleaf.templatemode.TemplateModeSets the template mode.
micronaut.views.thymeleaf.suffixjava.lang.StringSets the suffix to use.
micronaut.views.thymeleaf.force-suffixbooleanSets whether to force the suffix. Default value (false).
micronaut.views.thymeleaf.force-template-modebooleanSets whether to force template mode. Default value (false).
micronaut.views.thymeleaf.cache-ttlmslongSets the cache TTL in millis.
micronaut.views.thymeleaf.check-existencebooleanSets whether templates should be checked for existence.
micronaut.views.thymeleaf.cacheablebooleanSets whether templates are cacheable.
micronaut.views.thymeleaf.enabledbooleanSets whether thymeleaf rendering is enabled. Default value (true).
micronaut.views.thymeleaf.cache-ttljava.time.DurationSets the cache TTL as a duration.

Micronaut Views Turbo Config Properties

Configuration properties for TurboConfigurationProperties

PropertyTypeDescription
micronaut.views.turbo.enabledbooleanWhether the turbo integration is enabled. Default value (true).

Micronaut Views Velocity Config Properties

Configuration properties for VelocityViewsRendererConfigurationProperties

PropertyTypeDescription
micronaut.views.velocity.enabledbooleanWhether velocity views are enabled.
micronaut.views.velocity.default-extensionjava.lang.StringSets the default extension to use for velocity templates.