SpringBoot使用通用mapper模板的insertSelective相关异常
SpringBoot使用通用mapper模板的insertSelective相关异常项目场景:问题描述:原因分析:解决方案:项目场景:这里简述项目相关背景:配置springboot后,使用通用mapper的insertSelective方法进行有选择性地插入,正确配置了pojo中的User( @Id和@KeySql(useGeneratedKeys = true)注解),最后进行test测试时故意将主键id的值进行缺省,测试时报错问题描述:提交User的属性时发现,主键id的值缺省后就会以下报错
原创
2020-09-28 01:06:43 ·
1555 阅读 ·
0 评论