Annotation Interface ImportTestcontainers


@Target(TYPE) @Retention(RUNTIME) @Documented @Import(org.springframework.boot.testcontainers.context.ImportTestcontainersRegistrar.class) public @interface ImportTestcontainers
Imports idiomatic Testcontainer declaration classes into the Spring ApplicationContext. The following elements will be considered from the imported classes:
  • All static fields that declare Container values.
  • All @DynamicPropertySource annotated methods.
Since:
3.1.0
Author:
Phillip Webb
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    The declaration classes to import.
  • Element Details

    • value

      Class<?>[] value
      The declaration classes to import. If no value is defined then the class that declares the @ImportTestcontainers annotation will be searched.
      Returns:
      the definition classes to import
      Default:
      {}