当前位置:网站首页>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();
边栏推荐
- 小程序跳转H5,配置业务域名经验教程
- What are the test preparation materials and methods for soft exam information processing technicians?
- 深入理解Apache Hudi异步索引机制
- Schnuka: working principle of robot visual grasping machine visual grasping
- 單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint
- Arduino receives and sends strings
- Leetcode-560: subarray with sum K
- The difference between monotonicity constraint and anti monotonicity constraint
- Network engineer test questions and answers in May of the first half of 2022
- 简单易修改的弹框组件
猜你喜欢
IO model review
MySQL insert data create trigger fill UUID field value
BUUCTF---Reverse---reverse1
Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master
在线硬核工具
Prototype and prototype chain
Différences entre les contraintes monotones et anti - monotones
ThreadLocal is not enough
What are the contents of the intermediate soft test, the software designer test, and the test outline?
China Southern Airlines pa3.1
随机推荐
[OneNote] can't connect to the network and can't sync the problem
Unity script generates configurable files and loads
打算参加安全方面工作,信息安全工程师怎么样,软考考试需要怎么准备?
Gym installation pit records
ArrayList线程不安全和解决方案
[pytorch 07] hands on deep learning chapter_ Preliminaries/ndarray exercises hands-on version
2022.7.4DAY596
软考中级有用吗??
What are the contents of the intermediate soft test, the software designer test, and the test outline?
Schnuka: working principle of robot visual grasping machine visual grasping
Records on the use of easyflash v3.3
Monai version has been updated to 0.9. See what new functions it has
Is the gold content of intermediate e-commerce division in the soft exam high?
P1223 queuing for water /1319: [example 6.1] queuing for water
Différences entre les contraintes monotones et anti - monotones
施努卡:机器视觉定位技术 机器视觉定位原理
单调性约束与反单调性约束的区别 monotonicity and anti-monotonicity constraint
leetcode-560:和为 K 的子数组
Five simple and practical daily development functions of chrome are explained in detail. Unlock quickly to improve your efficiency!
Leetcode-303: region and retrieval - array immutable