Hibernate spring annotation sessions not being closed/flushed

后端 未结 4 1842
情书的邮戳
情书的邮戳 2021-01-07 08:04

I\'ve \'inherited\' a project which uses Spring annotations to manage transactions/sessions with Hibernate. Or at least it\'s meant to be. Currently the Hibernate sessions n

4条回答
  •  独厮守ぢ
    2021-01-07 08:46

    if the transaction (which is annotated) succeeds then transaction.commit() is called automatically which will write the contents to the DB, please check if the transaction is being called and there are no exceptions being thrown.

    also ensure that you link your sessionfactory to the transcation which is declared.

提交回复
热议问题