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

后端 未结 11 2200
迷失自我
迷失自我 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 11:44

    1. Add @Transactional above you database operation methods

    2. Make sure you have annotation driven transation manager add above HibernateTransactionManager configuration in applicationContext.xml file

提交回复
热议问题