异常处理:Prohibition of full table deletion
表数据删除操作
目标:删除导入中间表中未成功导入的数据记录
我这里带了条件,但是依旧被认为是全表删除操作,因此报出异常:Prohibition of full table deletion
mapper接口内容
@Delete("delete from ctlm601 where c601_flag_import != '1'")
boolean deleteExcel();
结果
添加注解:@InterceptorIgnore(blockAttack = “true”)
mapper接口内容
@InterceptorIgnore(blockAttack = "true")
@Delete("delete from ctlm601 where c601_flag_import != '1'")
boolean deleteExcel();
结果
本人遇到此bug困扰许久,最后尝试搜索异常关键词:Prohibition of full table deletion才成功找到解决办法,在此附上目标文章链接:Prohibition of full table deletion 解决方法