Package io.mats3.spring.test
Annotation Interface MatsTestDbContext
@Target(TYPE)
@Retention(RUNTIME)
@ContextConfiguration(initializers=MatsSimpleTestInfrastructureDbContextInitializer.class)
@Import(MatsTestInfrastructureDbConfiguration.class)
@DirtiesContext
@Documented
@MatsTestProfile
public @interface MatsTestDbContext
Same as
MatsTestContext
, but includes a H2 DataSource, as configured by
MatsTestInfrastructureDbConfiguration
.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The reason for this obscure way to add theMatsTestInfrastructureDbConfiguration
(as opposed to just point to it with "classes=..") is as follows: Spring's testing integration has this feature where any static inner @Configuration class of the test class is automatically loaded.