<#if user>
<#if user.usertype==1>卖家<#else>买家</#if>你好,<span class="name">${user.username}</span>!<a href="/logout">[退出]</a>
<#else>
小弟写了一个freemarker的代码如果用户不为空的话就执行if下的代码,但是在spring中如何定义user呢,如果定义成hash,控制台会报错:Expected a boolean, but this has evaluated to an extended_hash
请问各位,user应该如何定义呢?
如果你用的是 spring mvc 可以 用类似
下面是随便找的一个例子 http://www.cnblogs.com/candle... 不过应该可以用