Учитывая шаблон Freemarker
class ${name.capitalize()}
и данные
val data = mapOf("name" to "test")
Я бы хотел получить следующий результат, применив метод расширения capitalize()
для name
:
class Test
Однако выдается ошибка:
FreeMarker template error:
For "." left-hand operand: Expected a hash, but this has evaluated to a string (wrapper: f.t.SimpleScalar):
==> name [in template "table.ftl" at line 1, column 24]
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${name.capitalize()} [in template "table.ftl" at line 1, column 22]
----