${productInfo.productIcon}无法定义
来源:10-3 实现商品列表
car
2017-11-17
${productInfo.productIcon}这句出错,抛出错误
FTL stack trace ("~" means nesting-related):
- Failed at: ${productInfo.productIcon} [in template "product/list.ftl" at line 36, column 69]
----
at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:465)
at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:387)
at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:356)
at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:96)
at freemarker.core.DollarVariable.accept(DollarVariable.java:59)
at freemarker.core.Environment.visit(Environment.java:362)
at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:315)
at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271)
at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:242)
at freemarker.core.Environment.visitIteratorBlock(Environment.java:595)
at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:107)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:93)
at freemarker.core.Environment.visit(Environment.java:326)
at freemarker.core.Environment.visit(Environment.java:332)
at freemarker.core.Environment.process(Environment.java:305)
at freemarker.template.Template.process(Template.java:378)
1回答
-
这个是和java里定义的对象相对应的,检查下自己定义的对象。还找不出问题,就对比下源码。
032017-11-18
相似问题