PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

getHibernateTemplate().save();不能保存数据到数据库解决办法

原创
2016-06-07 15:10:50 1269浏览

在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
        

        root
        root
        
            com.mysql.jdbc.Driver
        

        true
        kucun
        
        
        
        
        
        
        
        
        
        
        
        

    


把的属性connection.autocommit设置为true就ok了


声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。