freemarker 中,施用省略号(.)代替过长的字符串
http://www.iteye.com/wiki/blog/660430
http://www.iteye.com/wiki/blog/660430
<#if msg.messageContent?length lt 20> ${(msg.messageContent)?default("")} <#else> ${(msg.messageContent[0..19])?default("")}... </#if>
freemarker 语法http://swiftlet.net/archives/category/freemarker
判断对象是否为空字符串
<#if user.nickName!=''> ${user.nickName} <#else> 暂无昵称 </#if>