Annotation Interface ApplicationModuleTest


@Target(TYPE) @Documented @Inherited @Retention(RUNTIME) @SpringBootTest @TypeExcludeFilters(ModuleTypeExcludeFilter.class) @ImportAutoConfiguration(ModuleTestAutoConfiguration.class) @ExtendWith({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 verifyAutomatically
      Whether to automatically verify the module structure for validity.
      Returns:
      Default:
      true
    • extraIncludes

      String[] extraIncludes
      Module names of modules to be included in the test run independent of what the mode() defines.
      Returns:
      Default:
      {}
    • webEnvironment

      @AliasFor(annotation=org.springframework.boot.test.context.SpringBootTest.class) org.springframework.boot.test.context.SpringBootTest.WebEnvironment webEnvironment
      The type of web environment to create when applicable. Defaults to SpringBootTest.WebEnvironment.MOCK.
      Returns:
      the type of web environment
      Default:
      MOCK