批注接口 ImportTestcontainers


@Target(TYPE) @Retention(RUNTIME) @Documented @Import(org.springframework.boot.testcontainers.context.ImportTestcontainersRegistrar.class) @ImportAutoConfiguration(TestcontainersPropertySourceAutoConfiguration.class) public @interface ImportTestcontainers
Imports idiomatic Testcontainers 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.
从以下版本开始:
3.1.0
作者:
Phillip Webb
  • 可选元素概要

    可选元素
    修饰符和类型
    可选元素
    说明
    Class<?>[]
    The declaration classes to import.
  • 元素详细资料

    • value

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