mybatis格式化异常:NumberFormatException,For input string:"x"

https://segmentfault.com/a/1190000006577082

问题定位:该问题通常出现在动态sql中,使用String与char类型做比较。如:

<if test="segment != null and segment != '' and segment == '1'">

解决方案:

--方案一
<if test="segment != null and segment != '' and segment == '1'.toString()">

--方案二
<if test='segment != null and segment != '' and segment == "1">

--方案三
<if test="segment != null and segment != '' and segment == &quot;1&quot;">
原文地址:https://www.cnblogs.com/jixiegongdi/p/14591753.html