Skip to content

Commit

Permalink
Document unsupported Freemarker properties with WebFlux
Browse files Browse the repository at this point in the history
This commit updates the configuration metadata and the reference guide
to mention that certain FreeMarker features are not available with
WebFlux.

This stems mostly from the fact that the WebFlux integration is not
based on a AbstractTemplateView.

Closes gh-11199
  • Loading branch information
snicoll committed Aug 2, 2024
1 parent a2fafa1 commit efaebb1
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,34 @@
"reason": "Removed in the open source release of Flyway 7.12."
}
},
{
"name": "spring.freemarker.allow-request-override",
"description": "Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. Only supported with Spring MVC."
},
{
"name": "spring.freemarker.allow-session-override",
"description": "Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. Only supported with Spring MVC."
},
{
"name": "spring.freemarker.cache",
"description": "Whether to enable template caching. Only supported with Spring MVC."
},
{
"name": "spring.freemarker.content-type",
"description": "Content-Type value. Only supported with Spring MVC."
},
{
"name": "spring.freemarker.expose-request-attributes",
"description": "Whether all request attributes should be added to the model prior to merging with the template. Only supported with Spring MVC."
},
{
"name": "spring.freemarker.expose-session-attributes",
"description": "Whether all HttpSession attributes should be added to the model prior to merging with the template. Only supported with Spring MVC."
},
{
"name": "spring.freemarker.expose-spring-macro-helpers",
"description": "Whether to expose a RequestContext for use by Spring's macro library, under the name \"springMacroRequestContext\". Only supported with Spring MVC."
},
{
"name": "spring.freemarker.prefix",
"defaultValue": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ See {code-spring-boot-autoconfigure-src}/thymeleaf/ThymeleafAutoConfiguration.ja
If you use FreeMarker, set `spring.freemarker.cache` to `false`.
See {code-spring-boot-autoconfigure-src}/freemarker/FreeMarkerAutoConfiguration.java[`FreeMarkerAutoConfiguration`] for other FreeMarker customization options.

NOTE: Template caching for FreeMarker is not supported with WebFlux.



[[howto.hotswapping.reload-templates.groovy]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ Spring Boot includes auto-configuration support for the following templating eng
* https://www.thymeleaf.org[Thymeleaf]
* https://mustache.github.io/[Mustache]

NOTE: Not all FreeMarker features are supported with WebFlux.
For more details, check the description of each property.

When you use one of these templating engines with the default configuration, your templates are picked up automatically from `src/main/resources/templates`.


Expand Down

0 comments on commit efaebb1

Please sign in to comment.