Skip to content

Support @BeforeTransaction and @AfterTransaction on interface default methods [SPR-14183] #18754

Closed
@spring-projects-issues

Description

@spring-projects-issues

Sam Brannen opened SPR-14183 and commented

Status Quo

Java 8 introduced support for interface default methods. JUnit 5 as well as some existing Runner implementations for JUnit 4.x already support default methods in various scenarios -- for example, @Test, @BeforeEach, etc. However, the Spring TestContext Framework does not yet support the declaration of @BeforeTransaction and @AfterTransaction on default methods: it simply does not find them.

Deliverables

  1. Update the annotated method search algorithms in TransactionalTestExecutionListener so that @BeforeTransaction and @AfterTransaction can be declared on interface default methods.

Issue Links:

Referenced from: commits ff38224, 0f6711f

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions