当前位置:网站首页>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();
边栏推荐
- Openinstall and Hupu have reached a cooperation to mine the data value of sports culture industry
- 原型与原型链
- leetcode-560:和为 K 的子数组
- 关于easyflash v3.3使用过程的记录
- Find the greatest common divisor and the least common multiple (C language)
- 软考中级电子商务师含金量高嘛?
- 简单易修改的弹框组件
- Typescript interface inheritance
- When do you usually get grades in the soft exam? Online pedaling?
- [recommendation system 01] rechub
猜你喜欢

VR development optimization

Use load_ decathlon_ Datalist (Monai) fast loading JSON data

What does intermediate software evaluator test

IIC Basics

Mendeley -- a free document management tool that automatically inserts references into papers

MySQL insert data create trigger fill UUID field value

China Southern Airlines pa3.1
![1321: [example 6.3] deletion problem (noip1994)](/img/bd/b605ec7b901079a9ebaca446fad7fb.png)
1321: [example 6.3] deletion problem (noip1994)

P2788 math 1 - addition and subtraction

在线硬核工具
随机推荐
CC2530 zigbee IAR8.10.1环境搭建
How to successfully pass the senior system architecture designer in the second half of the year?
使用Tansformer分割三维腹部多器官--UNETR实战
Trajectory planning for multi robot systems: methods and Applications Overview reading notes
[detailed explanation of Huawei machine test] tall and short people queue up
leetcode-304:二维区域和检索 - 矩阵不可变
【推荐系统 01】Rechub
【PyTorch 07】 动手学深度学习——chapter_preliminaries/ndarray 习题动手版
When do you usually get grades in the soft exam? Online pedaling?
【实战】霸榜各大医学分割挑战赛的Transformer架构--nnFormer
南航 PA3.1
高级软考(网络规划设计师)该如何备考?
Common shortcut keys in IDA
I'd rather say simple problems a hundred times than do complex problems once
JS实现链式调用
[homework] 2022.7.6 write your own cal function
Those confusing concepts (3): function and class
Application of OpenGL gllightfv function and related knowledge of light source
Leetcode-304: two dimensional area and retrieval - matrix immutable
中级网络工程师是什么?主要是考什么,有什么用?