在hibernate的配置文件hibernate.cfg.xml中 ?xml version='1.0' encoding='UTF-8'? !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate Configuration DTD 3.0//EN http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd !-- Gen
在hibernate的配置文件hibernate.cfg.xml中
br>
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
org.hibernate.dialect.MySQLDialect
jdbc:mysql://127.0.0.1:3306/abc
com.mysql.jdbc.Driver
把的属性connection.autocommit设置为true就ok了