Document unsupported Freemarker properties with WebFlux

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
This commit is contained in:
Stéphane Nicoll 2024-08-02 15:03:25 +02:00
parent a2fafa112f
commit efaebb1351
3 changed files with 33 additions and 0 deletions

View File

@ -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": ""

View File

@ -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]]

View File

@ -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`.