BUG/错误集锦(1)

这篇博客总结了Mybatis在插入数据时遇到的问题,包括MySQL的Data truncated错误、无法反序列化对象的问题、Invalid bound statement错误以及Field 'id'无默认值的问题。并详细解析了每个错误的原因及提供了解决方法,如检查数据类型和长度匹配、修正mapper接口与XML映射、设置主键自增等。
摘要由CSDN通过智能技术生成

Mybatis中的instert时候,未判断空值,出现的错误

2022-04-22 21:41:28.013 ERROR 1 --- [nio-9099-exec-8] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: 
### Error updating database.  Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
### The error may exist in class path resource [mapper/AlarmDisposeMapper.xml]
### The error may involve com.boot.reservation.mapper.AlarmDisposeMapper.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值