@AfterTransaction
@AfterTransaction 表示注解的 void 方法应该在事务结束后运行,这对于使用 Spring 的 @Transactional 注解配置为在事务内运行的测试方法而言。@AfterTransaction 方法不需要是 public ,并且可以声明在接口的默认方法上。
-
Java
-
Kotlin
@AfterTransaction (1)
void afterTransaction() {
// logic to be run after a transaction has ended
}
| 1 | 在事务之后运行此方法。 |
@AfterTransaction (1)
fun afterTransaction() {
// logic to be run after a transaction has ended
}
| 1 | 在事务之后运行此方法。 |