springboot Templating Properties 模板引擎配置属性 2306

news/2024/10/18 12:23:16/

springboot Templating Properties 模板引擎配置属性 2306

Springboot Properties 2306

10. Templating Properties 模板属性

NameDescriptionDefault Value

spring.freemarker.allow-request-override

Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.

false

spring.freemarker.allow-session-override

Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name.

false

spring.freemarker.cache

Whether to enable template caching.

false

spring.freemarker.charset

Template encoding.

UTF-8

spring.freemarker.check-template-location

Whether to check that the templates location exists.

true

spring.freemarker.content-type

Content-Type value.

text/html

spring.freemarker.enabled

Whether to enable MVC view resolution for this technology.

true

spring.freemarker.expose-request-attributes

Whether all request attributes should be added to the model prior to merging with the template.

false

spring.freemarker.expose-session-attributes

Whether all HttpSession attributes should be added to the model prior to merging with the template.

false

spring.freemarker.expose-spring-macro-helpers

Whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext".

true

spring.freemarker.prefer-file-system-access

Whether to prefer file system access for template loading to enable hot detection of template changes. When a template path is detected as a directory, templates are loaded from the directory only and other matching classpath locations will not be considered.

false

spring.freemarker.prefix

Prefix that gets prepended to view names when building a URL.

spring.freemarker.request-context-attribute

Name of the RequestContext attribute for all views.

spring.freemarker.settings.*

Well-known FreeMarker keys which are passed to FreeMarker's Configuration.

spring.freemarker.suffix

Suffix that gets appended to view names when building a URL.

.ftlh

spring.freemarker.template-loader-path

Comma-separated list of template paths.

[classpath:/templates/]

spring.freemarker.view-names

View names that can be resolved.

spring.groovy.template.allow-request-override

Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.

false

spring.groovy.template.allow-session-override

Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name.

false

spring.groovy.template.cache

Whether to enable template caching.

false

spring.groovy.template.charset

Template encoding.

UTF-8

spring.groovy.template.check-template-location

Whether to check that the templates location exists.

true

spring.groovy.template.configuration.auto-escape
spring.groovy.template.configuration.auto-indent
spring.groovy.template.configuration.auto-indent-string
spring.groovy.template.configuration.auto-new-line
spring.groovy.template.configuration.base-template-class
spring.groovy.template.configuration.cache-templates
spring.groovy.template.configuration.declaration-encoding
spring.groovy.template.configuration.expand-empty-elements
spring.groovy.template.configuration.locale
spring.groovy.template.configuration.new-line-string
spring.groovy.template.configuration.resource-loader-path
spring.groovy.template.configuration.use-double-quotes

See GroovyMarkupConfigurer

spring.groovy.template.content-type

Content-Type value.

text/html

spring.groovy.template.enabled

Whether to enable MVC view resolution for this technology.

true

spring.groovy.template.expose-request-attributes

Whether all request attributes should be added to the model prior to merging with the template.

false

spring.groovy.template.expose-session-attributes

Whether all HttpSession attributes should be added to the model prior to merging with the template.

false

spring.groovy.template.expose-spring-macro-helpers

Whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext".

true

spring.groovy.template.prefix

Prefix that gets prepended to view names when building a URL.

spring.groovy.template.request-context-attribute

Name of the RequestContext attribute for all views.

spring.groovy.template.resource-loader-path

Template path.

classpath:/templates/

spring.groovy.template.suffix

Suffix that gets appended to view names when building a URL.

.tpl

spring.groovy.template.view-names

View names that can be resolved.

spring.mustache.charset

Template encoding.

UTF-8

spring.mustache.check-template-location

Whether to check that the templates location exists.

true

spring.mustache.enabled

Whether to enable MVC view resolution for Mustache.

true

spring.mustache.prefix

Prefix to apply to template names.

classpath:/templates/

spring.mustache.reactive.media-types

Media types supported by Mustache views.

text/html;charset=UTF-8

spring.mustache.request-context-attribute

Name of the RequestContext attribute for all views.

spring.mustache.servlet.allow-request-override

Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.

false

spring.mustache.servlet.allow-session-override

Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name.

false

spring.mustache.servlet.cache

Whether to enable template caching.

false

spring.mustache.servlet.content-type

Content-Type value.

spring.mustache.servlet.expose-request-attributes

Whether all request attributes should be added to the model prior to merging with the template.

false

spring.mustache.servlet.expose-session-attributes

Whether all HttpSession attributes should be added to the model prior to merging with the template.

false

spring.mustache.servlet.expose-spring-macro-helpers

Whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext".

true

spring.mustache.suffix

Suffix to apply to template names.

.mustache

spring.mustache.view-names

View names that can be resolved.

spring.thymeleaf.cache

Whether to enable template caching.

true

spring.thymeleaf.check-template

Whether to check that the template exists before rendering it.

true

spring.thymeleaf.check-template-location

Whether to check that the templates location exists.

true

spring.thymeleaf.enable-spring-el-compiler

Enable the SpringEL compiler in SpringEL expressions.

false

spring.thymeleaf.enabled

Whether to enable Thymeleaf view resolution for Web frameworks.

true

spring.thymeleaf.encoding

Template files encoding.

UTF-8

spring.thymeleaf.excluded-view-names

Comma-separated list of view names (patterns allowed) that should be excluded from resolution.

spring.thymeleaf.mode

Template mode to be applied to templates. See also Thymeleaf's TemplateMode enum.

HTML

spring.thymeleaf.prefix

Prefix that gets prepended to view names when building a URL.

classpath:/templates/

spring.thymeleaf.reactive.chunked-mode-view-names

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.

spring.thymeleaf.reactive.full-mode-view-names

Comma-separated list of view names (patterns allowed) that should be executed in FULL mode even if a max chunk size is set.

spring.thymeleaf.reactive.max-chunk-size

Maximum size of data buffers used for writing to the response. Templates will execute in CHUNKED mode by default if this is set.

0B

spring.thymeleaf.reactive.media-types

Media types supported by the view technology.

[text/html, application/xhtml+xml, application/xml, text/xml, application/rss+xml, application/atom+xml, application/javascript, application/ecmascript, text/javascript, text/ecmascript, application/json, text/css, text/plain, text/event-stream]

spring.thymeleaf.render-hidden-markers-before-checkboxes

Whether hidden form inputs acting as markers for checkboxes should be rendered before the checkbox element itself.

false

spring.thymeleaf.servlet.content-type

Content-Type value written to HTTP responses.

text/html

spring.thymeleaf.servlet.produce-partial-output-while-processing

Whether Thymeleaf should start writing partial output as soon as possible or buffer until template processing is finished.

true

spring.thymeleaf.suffix

Suffix that gets appended to view names when building a URL.

.html

spring.thymeleaf.template-resolver-order

Order of the template resolver in the chain. By default, the template resolver is first in the chain. Order start at 1 and should only be set if you have defined additional "TemplateResolver" beans.

spring.thymeleaf.view-names

Comma-separated list of view names (patterns allowed) that can be resolved.


http://www.ppmy.cn/news/486023.html

相关文章

gitbook出现TypeError: cb.apply is not a function解决办法

降低node版本 nvm install 10.14.1 nvm use 10.14.1我用了 10.14.1版本的node就成功了

npm ERR!cb.apply is not a function

报错如下: 原因:npm本地缓存出现了一些问题 解决:删除本地缓存 1. 进入对应C:\Users~~~\AppData\Roaming目录(可以WinR输入 %appdata% 直接进入) 2. 删除npm和npm_cache文件夹 3. 命令行输入 npm clean cache --fo…

error cb() never called!

D:\WebstormProjects\cms-web>npm -v 6.14.10 D:\WebstormProjects\cms-web>node -v v14.15.4查看 npm配置,如果存在registry为https://registry.npm.taobao.org,编辑文件C:\Users\用户名.npmrc,删掉对应配置 npm config list or npm config ls -…

CB5:Error E2266: No file names given

CB5,命令行编译时,出现如下错误: Error E2266: No file names given 这个问题是bpr文件的错误,找个可以编译的,对比一下,然后修改相关不一致的地方即可.

npm 报 cb.apply is not a function

问题背景: 在运行低版本React时候发现高版本node不能运行该项目于是我安装了nvm进行node版本管理,期间要注意nvm需要安装到D盘根目录下否则会出现各种奇奇怪怪的问题。安装好低版本node后发现执行npm install后报cb.apply is not a function 第零步:如…

gitbook init出现TypeError: cb.apply is not a function解决办法

执行 gitbook init 出现如下报错: 找到提示路径,打开 polyfills.js 文件,找到这个函数。 在第 65-67 行调用了这个函数 fs.stat statFix(fs.stat) fs.fstat statFix(fs.fstat) fs.lstat statFix(fs.lstat)把这三行代码注释掉就解决报…

npm报错 cb.apply is not a function

1.cmd输入 npm-v 查看版本 2查看项目根目录下package.json 里面的npm版本 如果黑窗口npm的版本号和package.json里面的npm的版本号不一致,则手动更改package.json的npm版本为黑窗口的版本。 最后终端输入 npm install。。。。。 希望可以帮到你 ​​​​​​

CB2401、CB2402-芯百特推出的面向IOT平台的高效功率放大器系列产品

今日推送深圳芯百特微电子有限公司专为IOT应用设计的高效功率放大器系列产品-CB2401/CB2402。 CB2401架构集成了PA、LNA、发射和接收交换电路、相关匹配网络和谐波滤波器。它集成了IEEE 802.15.4/ZigBee、无线传感器网络和2.4GHz ISM频段等协议进行信号放大。CB2401具有性能优越…