diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index 10ae2cb5cc..d5278af2fb 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -52,6 +52,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import javax.annotation.Resource; @@ -60,6 +61,7 @@ import java.util.*; import java.util.stream.Collectors; @Service +@Transactional(rollbackFor = Exception.class) public class TestPlanService { Logger testPlanLog = LoggerFactory.getLogger("testPlanExecuteLog");