Java / Hibernate - Write operations are not allowed in read-only mode

后端 未结 11 2186
迷失自我
迷失自我 2020-11-28 11:18

I\'ve been having an annoying exception a lot lately, and after some research on Google and this forum I still haven\'t found an answer that could solve my problem.

11条回答
  •  北海茫月
    2020-11-28 12:07

    Try to use this

    hibernateTemplate = new HibernateTemplate(sessionFactory);
    hibernateTemplate.setCheckWriteOperations(false);
    

    The error should go away as the template is not checking if you are using a transaction.

提交回复
热议问题