批注接口 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
-
可选元素概要
可选元素
-
元素详细资料
-
value
Class<?>[] valueThe declaration classes to import. If novalue
is defined then the class that declares the@ImportTestcontainers
annotation will be searched.- 返回:
- the definition classes to import
- 默认值:
{}
-