Updated deprecated ConfigFileApplicationContextInitializer usage, now using ConfigDataApplicationContextInitializer
This commit is contained in:
parent
a97e1c360e
commit
83664977f0
|
@ -6,14 +6,14 @@ import org.junit.jupiter.api.Test;
|
|||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer;
|
||||
import org.springframework.boot.test.context.ConfigDataApplicationContextInitializer;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
||||
import com.baeldung.properties.yamllist.pojo.ApplicationProps;
|
||||
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ContextConfiguration(initializers = ConfigFileApplicationContextInitializer.class)
|
||||
@ContextConfiguration(initializers = ConfigDataApplicationContextInitializer.class)
|
||||
@EnableConfigurationProperties(value = ApplicationProps.class)
|
||||
class YamlComplexListsUnitTest {
|
||||
|
||||
|
|
|
@ -6,14 +6,14 @@ import org.junit.jupiter.api.Test;
|
|||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer;
|
||||
import org.springframework.boot.test.context.ConfigDataApplicationContextInitializer;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
||||
import com.baeldung.properties.yamllist.pojo.ApplicationProps;
|
||||
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ContextConfiguration(initializers = ConfigFileApplicationContextInitializer.class)
|
||||
@ContextConfiguration(initializers = ConfigDataApplicationContextInitializer.class)
|
||||
@EnableConfigurationProperties(value = ApplicationProps.class)
|
||||
class YamlSimpleListUnitTest {
|
||||
|
||||
|
|
Loading…
Reference in New Issue