1.改为:test="param eq 'A'.toString()"
2.原因是OGNL语法的问题:
这里 'A' 将被认为是 char 类型,但是 'AA' 或者 "A" 将被作为 String类型。
所以我们可以用转义:<if test="name == "A"">
3.或者将 <if test="index == 'A'"> 改为 <if test='index == "A"'>。
本人采用的第三种解决问题
1.改为:test="param eq 'A'.toString()"
2.原因是OGNL语法的问题:
这里 'A' 将被认为是 char 类型,但是 'AA' 或者 "A" 将被作为 String类型。
所以我们可以用转义:<if test="name == "A"">
3.或者将 <if test="index == 'A'"> 改为 <if test='index == "A"'>。
本人采用的第三种解决问题