defaultAutoCommit

driver default The default auto-commit state of connections created by this pool. If not set then the setAutoCommit method will not be called.

如果不设置,则自动提交。此时conn.rollback(); conn.commit(); 不起作用。

只有设置为false 时,可以使用 conn.rollback();conn.commit();

原文地址:https://www.cnblogs.com/zno2/p/4764066.html