Thymeleaf is a template engine for Java-based applications. It allows you to include special attributes and tags in HTML, XML or JavaScript files and handle dynamic data processing and rendering. Spring Boot uses auto-configuration to integrate the application with Thymeleaf engine and provides common property values that should work without changing in most cases/applications.
2. Thymeleaf Spring Boot default properties
Spring Boot provides default configuration for Thymeleaf engine. To change common values we need to override property in configuration file: application.properties or application.yml.
The default Thymeleaf properties has the following values:
1) Whether to enable template caching
Default value is true, set to false if you want templates to be automatically updated when modified.
2) Whether to check that the template exists before rendering it
3) Whether to check that the templates location exists
4) Whether to enable Thymeleaf view resolution for Web frameworks
5) Enable the SpringEL compiler in SpringEL expressions.
6) Template files encoding.
7) Comma-separated list of view names (patterns allowed) that should be excluded from resolution.
8) Template mode to be applied to templates. See also Thymeleaf's TemplateMode enum.
9) Prefix that gets prepended to view names when building a URL.
10) Comma-separated list of view names (patterns allowed) that should be the only ones executed in CHUNKED mode when a max chunk size is set.
11) Comma-separated list of view names (patterns allowed) that should be executed in FULL mode even if a max chunk size is set.
12) Maximum size of data buffers used for writing to the response.
13) Media types supported by the view technology.
14) Whether hidden form inputs acting as markers for checkboxes should be rendered before the checkbox element itself.
15) Content-Type value written to HTTP responses.
16) Whether Thymeleaf should start writing partial output as soon as possible or buffer until template processing is finished.
17) Suffix that gets appended to view names when building a URL.
18) Order of the template resolver in the chain.
19) Comma-separated list of view names (patterns allowed) that can be resolved.
{{ 'Comments (%count%)' | trans {count:count} }}
{{ 'Comments are closed.' | trans }}