spring-framework / org.springframework.test.context.transaction / AfterTransaction

AfterTransaction

@Target([AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.ANNOTATION_CLASS]) class AfterTransaction

Test annotation which indicates that the annotated void method should be executed after a transaction is ended for a test method configured to run within a transaction via Spring's @Transactional annotation.

As of Spring Framework 4.3, @AfterTransaction may be declared on Java 8 based interface default methods.

@AfterTransaction methods declared in superclasses or as interface default methods will be executed after those of the current test class.

As of Spring Framework 4.0, this annotation may be used as a meta-annotation to create custom composed annotations.

Author
Sam Brannen

Since
2.5

See Also
org.springframework.transaction.annotation.TransactionalBeforeTransaction

Constructors

<init>

AfterTransaction()

Test annotation which indicates that the annotated void method should be executed after a transaction is ended for a test method configured to run within a transaction via Spring's @Transactional annotation.

As of Spring Framework 4.3, @AfterTransaction may be declared on Java 8 based interface default methods.

@AfterTransaction methods declared in superclasses or as interface default methods will be executed after those of the current test class.

As of Spring Framework 4.0, this annotation may be used as a meta-annotation to create custom composed annotations.