当前位置:网站首页>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();
边栏推荐
- Summary of router development knowledge
- Is the gold content of intermediate e-commerce division in the soft exam high?
- 原型与原型链
- P2788 math 1 - addition and subtraction
- 关于easyflash v3.3使用过程的记录
- [recommendation system 02] deepfm, youtubednn, DSSM, MMOE
- Prototype and prototype chain
- gym安装踩坑记录
- ArrayList线程不安全和解决方案
- How embedded engineers improve work efficiency
猜你喜欢

Leetcode-560: subarray with sum K
![[actual combat] transformer architecture of the major medical segmentation challenges on the list --nnformer](/img/de/0cf12132216ffbde896a7b12022184.png)
[actual combat] transformer architecture of the major medical segmentation challenges on the list --nnformer

如何顺利通过下半年的高级系统架构设计师?

软考中级,软件设计师考试那些内容,考试大纲什么的?

Prototype and prototype chain

leetcode-304:二维区域和检索 - 矩阵不可变
![1323: [example 6.5] activity selection](/img/2e/ba74f1c56b8a180399e5d3172c7b6d.png)
1323: [example 6.5] activity selection

What does intermediate software evaluator test

leetcode-560:和为 K 的子数组

Unity script generates configurable files and loads
随机推荐
IIC Basics
leetcode-303:区域和检索 - 数组不可变
软考中级电子商务师含金量高嘛?
Using U2 net deep network to realize -- certificate photo generation program
555 circuit details
2022.7.3DAY595
單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint
JS implementation chain call
深入理解Apache Hudi异步索引机制
中级软件评测师考什么
南航 PA3.1
What are the contents of the intermediate soft test, the software designer test, and the test outline?
China Southern Airlines pa3.1
Simple and easy to modify spring frame components
SQL Server 知识汇集11 : 约束
Use of dotween
【实战】霸榜各大医学分割挑战赛的Transformer架构--nnFormer
How to successfully pass the senior system architecture designer in the second half of the year?
How embedded engineers improve work efficiency
【推荐系统 02】DeepFM、YoutubeDNN、DSSM、MMOE