Closed
Description
I just upgraded my app to Spring Boot 3.0.5 (and consequently Spring 6.0.7) and there seems to be something broken with spring-boot-starter-freemarker
.
In my Freemarker template, I have this line that used to work before the upgrade:
<div>${RequestParameters.myParam!}</div>
After the upgrade, I get this error when loading the template:
freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> RequestParameters [in template "template.ftlh" at line 136, column 11]
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${RequestParameters.myParam!} [in template "template.ftlh" at line 136, column 9]
It seems like RequestParameters
is not available anymore.
I originally posted this issue in the spring-boot repo and @wilkinsona kindly pointed out that due to d84ca2b, there's no longer a RequestParameters entry in the model.
Are there plans to fix this?
Thanks!