【发布时间】:2021-09-12 14:53:54
【问题描述】:
我有一个自定义的 login-update-password.ftl 文件。我想显示用户的名字和姓氏。在基本示例的模板文件中,我看到了${username},它让我可以显示用户名。但是当我做${firstname} 时,会发生以下情况:
12:25:46,752 ERROR [freemarker.runtime] (default task-3) Error executing FreeMarker template: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> firstname [in template "login-update-password.ftl" at line 14, column 3]
当我执行${user.firstname} 时,会发生以下情况:
12:27:40,453 ERROR [freemarker.runtime] (default task-2) Error executing FreeMarker template: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> user [in template "login-update-password.ftl" at line 14, column 3]
我调试了可用的变量,但似乎没有什么是我需要的。
<#list .data_model?keys as key>
${key}
</#list>
msg
execution
social
auth
isAppInitiatedAction
requiredActionUrl
message
locale
authenticatorConfigured
login
url
messagesPerField
client
realm
kcSanitize
scripts
properties
username
如何加载更多用户数据?
【问题讨论】:
标签: keycloak freemarker