1. 程式人生 > >Mybatis的if test字串比較問題

Mybatis的if test字串比較問題

<if test="isExpired=='Y'">
and msg.expire_time &lt; now()

</if>

會報NumberFormatException,這樣就可以了。

<if test="isExpired=='Y'.toString()">
and msg.expire_time &lt; now()
</if>