mybatis在保存char型数据时,竟然发现报如下的数值转换错误异常,找了好久才发现是xml中的一处判断写错了。
Cause: java.lang.NumberFormatException: For input string: “Y”
原因就在于以下这段xml配置:
<when test="status == 'F'">
actual_time = sysdate,
</when>
正确的写法应该有如下两种:
<!--正确写法1-->
<when test='status=="F"'>
<!--正确写法2-->
<when test="status=="F"">
就在于test中引号的区别改过来就好了。