MyBatis-Spring-Boot
MyBatis-Spring-Boot copied to clipboard
springboot+oracle增加了这个配置mapper.before=true 插入的时候还是先执行了insert
数据库是oracle
如图所示,已经配置了mapper.before=true 但是还是不生效插入时提示id为null


@RequestMapping(value = "/save")
public SysUserEntity save(@RequestBody SysUserEntity entity){
int r = sysUserEntityMapper.insertSelective(entity);
return entity;
}
如果是3.5.0和1.2.0starter,你可以先配置为 mapper.ORDER=BEFORE 试试,最新代码已经完全支持 spring boot 原生的 relax 赋值,还需要处理一部分issue后才会正式发布。