<#if user>
<#if user.usertype==1>賣家<#else>買家</#if>你好,<span class="name">${user.username}</span>!<a href="/logout">[退出]</a>
<#else>
小弟寫(xiě)了一個(gè)freemarker的代碼如果用戶不為空的話就執(zhí)行if下的代碼,但是在spring中如何定義user呢,如果定義成hash,控制臺(tái)會(huì)報(bào)錯(cuò):Expected a boolean, but this has evaluated to an extended_hash請(qǐng)問(wèn)各位,user應(yīng)該如何定義呢?
添加回答
舉報(bào)
0/150
提交
取消