freemarker.core.InvalidReferenceException问题解决

     freemarker.core.InvalidReferenceException: Expression ctt.contentType is undefined on line 46, column 91 in

解决方法:
[#if ctt.contentType??][${ctt.contentType.name} - ${ctt.ctgName}] [#else][${ctt.ctgName}][/#if]
“??”判断是否为空。

还有可能直接设置一下数据库,有可能字段设为空值

原文地址:https://www.cnblogs.com/weipeng/p/2585126.html