错误出现:
含有错误的查询后,选中insert语句无法执行,报错current transaction is aborted, commands ignored until end of transaction block
分析:
事务中含有错误,再执行DML时,事务无法正常进行。
解决方法:
1.尝试connection.setAutoCommit(true);无法执行
2.直接commit ,提交后再执行insert语句,成功插入。
参考了stackoverflow的解法: