Transaction rolled back because it has been marked as rollback-only
今天在开发中遇到了这个问题,意思是事务已回滚,因为事务被标记为只能回滚原因:这是因为嵌套事务造成的,由于Spring中事务的默认传播级别是PROPAGATION_REQUIRED,即当前上下文存在事务则用此事务,如果不存在事务则新建一个事务执行;示例:@ServicepublicclassPersonServiceImplimplementsPersonService{@AutowiredCatS