Skip to content

Commit efaebb1

Browse files
committed
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
1 parent a2fafa1 commit efaebb1

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,6 +1444,34 @@
14441444
"reason": "Removed in the open source release of Flyway 7.12."
14451445
}
14461446
},
1447+
{
1448+
"name": "spring.freemarker.allow-request-override",
1449+
"description": "Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. Only supported with Spring MVC."
1450+
},
1451+
{
1452+
"name": "spring.freemarker.allow-session-override",
1453+
"description": "Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. Only supported with Spring MVC."
1454+
},
1455+
{
1456+
"name": "spring.freemarker.cache",
1457+
"description": "Whether to enable template caching. Only supported with Spring MVC."
1458+
},
1459+
{
1460+
"name": "spring.freemarker.content-type",
1461+
"description": "Content-Type value. Only supported with Spring MVC."
1462+
},
1463+
{
1464+
"name": "spring.freemarker.expose-request-attributes",
1465+
"description": "Whether all request attributes should be added to the model prior to merging with the template. Only supported with Spring MVC."
1466+
},
1467+
{
1468+
"name": "spring.freemarker.expose-session-attributes",
1469+
"description": "Whether all HttpSession attributes should be added to the model prior to merging with the template. Only supported with Spring MVC."
1470+
},
1471+
{
1472+
"name": "spring.freemarker.expose-spring-macro-helpers",
1473+
"description": "Whether to expose a RequestContext for use by Spring's macro library, under the name \"springMacroRequestContext\". Only supported with Spring MVC."
1474+
},
14471475
{
14481476
"name": "spring.freemarker.prefix",
14491477
"defaultValue": ""

spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/hotswapping.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ See {code-spring-boot-autoconfigure-src}/thymeleaf/ThymeleafAutoConfiguration.ja
4747
If you use FreeMarker, set `spring.freemarker.cache` to `false`.
4848
See {code-spring-boot-autoconfigure-src}/freemarker/FreeMarkerAutoConfiguration.java[`FreeMarkerAutoConfiguration`] for other FreeMarker customization options.
4949

50+
NOTE: Template caching for FreeMarker is not supported with WebFlux.
51+
5052

5153

5254
[[howto.hotswapping.reload-templates.groovy]]

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/reactive.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ Spring Boot includes auto-configuration support for the following templating eng
165165
* https://www.thymeleaf.org[Thymeleaf]
166166
* https://mustache.github.io/[Mustache]
167167

168+
NOTE: Not all FreeMarker features are supported with WebFlux.
169+
For more details, check the description of each property.
170+
168171
When you use one of these templating engines with the default configuration, your templates are picked up automatically from `src/main/resources/templates`.
169172

170173

0 commit comments

Comments
 (0)