ibatis TIMESTAMP的异常解决方法
后台错误信息如下:
Cannot convert value '0000-00-00 00:00:00' from column 16 to TIMESTAMP.; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
Cannot convert value '0000-00-00 00:00:00' from column 16 to TIMESTAMP.; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
解决方法:jdbc连接字符串添加后面黑体部分的内容。
jdbc:mysql://localhost:3306/sun?characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
jdbc:mysql://localhost:3306/sun?characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
本文讨论了在使用IBatis时遇到无法转换为TIMESTAMP的问题,并提供了通过修改JDBC连接字符串来解决该问题的具体步骤。
8491

被折叠的 条评论
为什么被折叠?



