diff --git a/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java index 9e0c54b8b00..bd78e69039f 100644 --- a/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java @@ -30,6 +30,7 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.annotation.BeanFactoryAnnotationUtils; import org.springframework.core.annotation.AnnotatedElementUtils; +import org.springframework.test.annotation.Commit; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.TestContext; import org.springframework.test.context.support.AbstractTestExecutionListener; @@ -43,7 +44,8 @@ import org.springframework.util.Assert; import org.springframework.util.ReflectionUtils; import org.springframework.util.StringUtils; -import static org.springframework.core.annotation.AnnotationUtils.*; +import static org.springframework.core.annotation.AnnotationUtils.findAnnotation; +import static org.springframework.core.annotation.AnnotationUtils.getAnnotation; /** * {@code TestExecutionListener} that provides support for executing tests @@ -83,8 +85,9 @@ import static org.springframework.core.annotation.AnnotationUtils.*; *

Declarative Rollback and Commit Behavior

*

By default, test transactions will be automatically rolled back * after completion of the test; however, transactional commit and rollback - * behavior can be configured declaratively via the {@link Rollback @Rollback} - * annotation at the class level and at the method level. + * behavior can be configured declaratively via the {@link Commit @Commit} + * and {@link Rollback @Rollback} annotations at the class level and at the + * method level. * *

Programmatic Transaction Management

*

As of Spring Framework 4.1, it is possible to interact with test-managed