springboot集成freemarker屬性配置(不知道是針對於某個版本,2.0后有變動)


freemarker屬性配置

freemarker屬性配置:

spring.freemarker.allow-request-override= false # 設置是否允許HttpServletRequest屬性重寫(隱藏)控制器生成的同名模型屬性。
spring.freemarker.allow-session-override= false # 設置是否允許HttpSession屬性重寫(隱藏)控制器生成的同名模型屬性。
spring.freemarker.cache= false # 啟用模板緩存。
spring.freemarker.charset=UTF-8
spring.freemarker.check-template-location= true # Check that the templates location exists.
spring.freemarker.content- type =text /html # Content-Type value.
spring.freemarker.enabled= true # Enable MVC view resolution for this technology. 為此技術啟用MVC視圖解析。
spring.freemarker.expose-request-attributes= false # 設置是否應在與模板合並之前將所有請求屬性添加到模型中。
spring.freemarker.expose-session-attributes= false # 設置是否應在與模板合並之前將所有HttpSession屬性添加到模型中。
spring.freemarker.expose-spring-macro-helpers= true # 設置是否公開名為“Spring macro RequestContext”的RequestContext供Spring的宏庫使用.
spring.freemarker.prefer- file -system-access= true # Prefer file system access for template loading. File system access enables hot detection of template changes.
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 will be passed to FreeMarker's Configuration.
spring.freemarker.suffix= # Suffix that gets appended to view names when building a URL.
spring.freemarker.template-loader-path=classpath: /templates/ # Comma-separated list of template paths.
spring.freemarker.view-names= # White list of view names that can be resolved.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM