Mybatis if 标签判断变量相等

两种方式:
<if test = 'sex== "Y"'>
<if test="sex=='Y'.toString()">

不能使用:

<if test="sex=='Y'">
  and 1=1
</if>

会报错:例如for  input  string 

猜你喜欢

转载自www.cnblogs.com/MrXiaoMa/p/11903964.html