spring 数据不提交问题

来源:互联网 发布:苹果电脑怎样卸载软件 编辑:程序博客网 时间:2024/06/05 20:38

按照视频编写了代码,显示输出都没问题,但是数据库就没有插入,琢磨了好久,确认是hibernate自动提交问题,在applicationContext.xml中的sessionFactory添加  

<property name="hibernateProperties">
   <props>
    <prop key="hibernate.connection.autocommit">true</prop>
   </props>
  </property>

原创粉丝点击