正确的 不需要加 ${} <#if fi.columnLowerName == primaryKeyName> </#if> 错误 <#if fi.columnLowerName == ${primaryKeyName}> </#if>