Mybatis 中 if test字符串比较问题

来源:互联网 发布:mac dns 编辑:程序博客网 时间:2024/04/30 14:28
<if test="'0'==levelCode">
</if>

这样会报错NumberFormatException


如果换成
<if test="'0'.toString()==levelCode">
</if>
就ok了
原创粉丝点击