自由标记:基于属性的模型
一样的表达式
<#if property.name == "true">
如果我正确理解FreeMarker的MapModel,那么像图片 会找到对象“属性”。而且,如果那是一张地图,请在内图中查找值“名称”。
现在,假设我的地图是一个属性对象,我希望“属性。名称被评估为属性“属性”的值。名称”?可能是吗?如何?
If I understand Freemarker's MapModel correctly, then an expression like
<#if property.name == "true">
would look into the map, finds an object "property". And, if that's a map, looks up the value "name" in the inner map.
Now, assume, that my Map is a Properties object, and I would want "property.name to be evaluated a s the value of property "property.name"? Is that possibly? How?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它应该与
java.util.properties
一起使用,因为它实现了java.util.map
。It should just work the same with
java.util.Properties
, because that implementsjava.util.Map
.