java - 使用@Transactional(readOnly = false)做插入操作报错求大神指导
PHPz
PHPz 2017-04-18 10:17:43
0
3
643

PHPz
PHPz

学习是最好的投资!

reply all(3)
阿神

My problem is that because the previous transaction has not ended yet, a new transaction cannot be started, so no matter what, an error must be reported. Add the @Transactional(propagation=Propagation.NOT_SUPPORTED) annotation on the service layer to start a new transaction, and it will be fine.

洪涛

You don’t insert操作吗?为什么要使用readOnly=true。这表示只读事务。不能用于写操作。
readOnlyjust remove it and it will be ok.

黄舟

Check your database permissions! Does it only have read-only permissions? I can't see any problem with the code.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!