Mybatis的if test字符串比较问题

来源:互联网 发布:淘宝网苏州虎丘牌二胡 编辑:程序博客网 时间:2024/05/17 22:40
<if test="isExpired=='Y'">
and msg.expire_time &lt; now()

</if>

会报NumberFormatException,这样就可以了。

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


在这里找到的答案https://code.google.com/p/mybatis/issues/detail?id=262

原创粉丝点击