当前位置:网站首页>Transaction rolled back because it has been marked as rollback-only解决
Transaction rolled back because it has been marked as rollback-only解决
2022-07-07 08:45:00 【自由_free】
项目中遇到Transaction rolled back because it has been marked as rollback-only错误
- 不要想 就是遇到了事物嵌套,即使你把所有方法上的@Transactional注解全部删除,仍会出现该错误
- 原因是,你某一个代码块使用了try catch
- 解决方法

- 这样就解决了,建议不要在service使用try catch,要是cation中throw RuntimeException也可以解决
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
边栏推荐
- How to play video on unityui
- TypeScript 接口继承
- Records on the use of easyflash v3.3
- 【机器学习 03】拉格朗日乘子法
- [pytorch 07] hands on deep learning chapter_ Preliminaries/ndarray exercises hands-on version
- Use load_ decathlon_ Datalist (Monai) fast loading JSON data
- 无法打开内核设备“\\.\VMCIDev\VMX”: 操作成功完成。是否在安装 VMware Workstation 后重新引导? 模块“DevicePowerOn”启动失败。 未能启动虚拟机。
- Application of OpenGL gllightfv function and related knowledge of light source
- How much review time does it usually take to take the intermediate soft exam?
- 关于easyflash v3.3使用过程的记录
猜你喜欢

seata 1.3.0 四种模式解决分布式事务(AT、TCC、SAGA、XA)

MySQL insert data create trigger fill UUID field value
![[installation system] U disk installation system tutorial, using UltraISO to make U disk startup disk](/img/41/3a9450a84291ba04caee65241bce5d.png)
[installation system] U disk installation system tutorial, using UltraISO to make U disk startup disk

What are the test preparation materials and methods for soft exam information processing technicians?

Unable to open kernel device '\.\vmcidev\vmx': operation completed successfully. Reboot after installing vmware workstation? Module "devicepoweron" failed to start. Failed to start the virtual machine

【OneNote】无法连接到网络,无法同步问题

Socket communication principle and Practice

软考中级有用吗??

How to successfully pass the senior system architecture designer in the second half of the year?

【STM32】实战3.1—用STM32与TB6600驱动器驱动42步进电机(一)
随机推荐
原型与原型链
What is an intermediate network engineer? What is the main test and what is the use?
[daiy5] jz77 print binary tree in zigzag order
IO model review
About hzero resource error (groovy.lang.missingpropertyexception: no such property: weight for class)
那些易混淆的概念(三):function和class
软考中级,软件设计师考试那些内容,考试大纲什么的?
ArrayList线程不安全和解决方案
JS实现链式调用
Schnuka: machine vision positioning technology machine vision positioning principle
BUUCTF---Reverse---reverse1
想考中级软考,一般需要多少复习时间?
【STM32】实战3.1—用STM32与TB6600驱动器驱动42步进电机(一)
深入理解Apache Hudi异步索引机制
长列表性能优化方案 memo
打算参加安全方面工作,信息安全工程师怎么样,软考考试需要怎么准备?
Unity script visualization about layout code
【推荐系统 02】DeepFM、YoutubeDNN、DSSM、MMOE
TypeScript 接口继承
MONAI版本更新到 0.9 啦,看看有什么新功能