当前位置: 代码迷 >> 综合 >> Mybatis参数格式化异常:NumberFormatException: For input string:“xx“
  详细解决方案

Mybatis参数格式化异常:NumberFormatException: For input string:“xx“

热度:70   发布时间:2023-12-18 08:00:40.0
### Error querying database.  Cause: java.lang.NumberFormatException: For input string: "T"

解决方法:

1、转成字符串:.toString()

 <if test="isHotel == 'F'.toString()">

2、加转义实体字符串引号&quot;

 <if test="isHotel == &quot;F&quot;">

3、外部单双引号交换

 <if test='isHotel == "F"'>

  相关解决方案