Annotation Interface ImportTestcontainers
@Target(TYPE)
@Retention(RUNTIME)
@Documented
@Import(org.springframework.boot.testcontainers.context.ImportTestcontainersRegistrar.class)
@ImportAutoConfiguration(TestcontainersPropertySourceAutoConfiguration.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
-
Element Details
-
value
Class<?>[] valueThe declaration classes to import. If novalue
is defined then the class that declares the@ImportTestcontainers
annotation will be searched.- Returns:
- the definition classes to import
- Default:
- {}
-