mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
43b01382ed
Prior to this commit, the extension context scope used by the SpringExtension defaulted to test-method scoped and could only be changed on a per-class basis via the @SpringExtensionConfig annotation. However, having to annotate each affected test class is cumbersome for developers who wish to use test-class scoped extension context semantics across their code base. To address that, this commit introduces support for configuring the global default extension context scope for the SpringExtension via Spring properties or JUnit properties. Specifically, this commit introduces a `spring.test.extension.context.scope` property that can be set via the SpringProperties mechanism or via a JUnit Platform configuration parameter. See gh-35697 Closes gh-36460