Annotation Interface ApplicationModuleTest
@Retention(RUNTIME)
@BootstrapWith(org.springframework.boot.test.context.SpringBootTestContextBootstrapper.class)
@TypeExcludeFilters(ModuleTypeExcludeFilter.class)
@ImportAutoConfiguration(ModuleTestAutoConfiguration.class)
@ExtendWith({org.springframework.test.context.junit.jupiter.SpringExtension.class,PublishedEventsParameterResolver.class,ScenarioParameterResolver.class})
@TestInstance(PER_CLASS)
@TestConstructor(autowireMode=ALL)
public @interface ApplicationModuleTest
Bootstraps the module containing the package of the test class annotated with
ApplicationModuleTest
. Will
apply the following modifications to the Spring Boot configuration:
- Restricts the component scanning to the module's package.
- Sets the module's package as the only auto-configuration and entity scan package.
- Author:
- Oliver Drotbohm
-
Element Details
-
value
- Default:
- STANDALONE
-
mode
- Default:
- STANDALONE
-
verifyAutomatically
boolean verifyAutomaticallyWhether to automatically verify the module structure for validity.- Returns:
- Default:
- true
-
extraIncludes
String[] extraIncludesModule names of modules to be included in the test run independent of what themode()
defines.- Returns:
- Default:
- {}
-