在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中
"-//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
root
root
com.mysql.jdbc.Driver
true
kucun
把的属性 connection.autocommit 设置为true就ok了
查看更多关于getHibernateTemplate().save();不能保存数据到数据库解决办法的详细内容...