@ExtendWith(value=SpringExtension.class) @ContextConfiguration @Documented @Inherited @Retention(value=RUNTIME) @Target(value=TYPE) public @interface SpringJUnitConfig
@SpringJUnitConfig
is a composed annotation that combines
@ExtendWith(SpringExtension.class)
from JUnit Jupiter with
@ContextConfiguration
from the Spring TestContext
Framework.
As of Spring Framework 5.3, this annotation will effectively be inherited
from an enclosing test class by default. See
@NestedTestConfiguration
for details.
ExtendWith
,
SpringExtension
,
ContextConfiguration
,
SpringJUnitWebConfig
Modifier and Type | Optional Element and Description |
---|---|
Class<?>[] |
classes
Alias for
ContextConfiguration.classes() . |
boolean |
inheritInitializers
Alias for
ContextConfiguration.inheritInitializers() . |
boolean |
inheritLocations
Alias for
ContextConfiguration.inheritLocations() . |
Class<? extends ApplicationContextInitializer<?>>[] |
initializers
Alias for
ContextConfiguration.initializers() . |
String[] |
locations
Alias for
ContextConfiguration.locations() . |
String |
name
Alias for
ContextConfiguration.name() . |
Class<?>[] |
value
Alias for
ContextConfiguration.classes() . |
@AliasFor(annotation=ContextConfiguration.class, attribute="classes") public abstract Class<?>[] value
ContextConfiguration.classes()
.@AliasFor(annotation=ContextConfiguration.class) public abstract Class<?>[] classes
ContextConfiguration.classes()
.@AliasFor(annotation=ContextConfiguration.class) public abstract String[] locations
ContextConfiguration.locations()
.@AliasFor(annotation=ContextConfiguration.class) public abstract Class<? extends ApplicationContextInitializer<?>>[] initializers
ContextConfiguration.initializers()
.@AliasFor(annotation=ContextConfiguration.class) public abstract boolean inheritLocations
ContextConfiguration.inheritLocations()
.@AliasFor(annotation=ContextConfiguration.class) public abstract boolean inheritInitializers
ContextConfiguration.inheritInitializers()
.@AliasFor(annotation=ContextConfiguration.class) public abstract String name
ContextConfiguration.name()
.