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.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!