mybatis中条件表达式if的test为字符串时值比较

mybatis中条件表达式字符串用''单引号不能直接比较,须要加toString()mybatis

<if test="param != null and param != 'hello'.toString()" >

或者用""双引号ide

<if test='param != null and param != "hello" ' >
相关文章
相关标签/搜索