Package io.mats3.spring.test
Class MatsTestDbContext.MatsSimpleTestInfrastructureDbContextInitializer
java.lang.Object
io.mats3.spring.test.MatsTestDbContext.MatsSimpleTestInfrastructureDbContextInitializer
- All Implemented Interfaces:
org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
- Enclosing class:
- MatsTestDbContext
public static class MatsTestDbContext.MatsSimpleTestInfrastructureDbContextInitializer
extends Object
implements org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
The reason for this obscure way to add the
MatsTestInfrastructureDbConfiguration
(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. If we specify specify classes= or
location=, this default will be thwarted.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(org.springframework.context.ConfigurableApplicationContext applicationContext)
-
Constructor Details
-
MatsSimpleTestInfrastructureDbContextInitializer
public MatsSimpleTestInfrastructureDbContextInitializer()
-
-
Method Details
-
initialize
public void initialize(org.springframework.context.ConfigurableApplicationContext applicationContext) - Specified by:
initialize
in interfaceorg.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
-