注释类型 BeforeTransaction
- @Target({METHOD,ANNOTATION_TYPE}) @Retention(RUNTIME) @Documented public @interface BeforeTransaction - Test annotation which indicates that the annotated - voidmethod should be executed before a transaction is started for a test method configured to run within a transaction via Spring's- @Transactionalannotation.- @BeforeTransactionmethods declared in superclasses or as interface default methods will be executed before those of the current test class.- This annotation may be used as a meta-annotation to create custom composed annotations. - As of Spring Framework 4.3, - @BeforeTransactionmay also be declared on Java 8 based interface default methods.- 从以下版本开始:
- 2.5
- 作者:
- Sam Brannen
- 另请参阅:
- Transactional,- AfterTransaction